Func Common Operations Commands

Source: Internet
Author: User

Return host memory usage information
Func ' * ' Call command Run "df-m"
Func ' * ' Call command Run "Df-h"
Func ' * ' Call command Run "free-m"
Return host uptime Information
Func ' * ' Call command Run "uptime"
Get remote host CPU information
Func ' * ' Call CPU Usage
Func ' * ' Call CPU usage 10
Get remote host disk partition information
Func ' * ' Call disk usage
Func ' * ' Call disk Usage/data
Get remote host system hardware information
Func ' * ' Call hardware info
Func ' * ' Call hardware Hal_info
Implementing remote host Process Management
Func ' * ' Call process info ' aux '
Func ' * ' Call process Pkill nginx-9
Func ' * ' Call process kill Nginx SIGHUP
Implementing remote host system service Management
Func ' * ' Call service start Nginx
Implement kernel parameter management of remote host system
Func ' * ' Call sysctl list
Func ' * ' Call sysctl get Net.nf_conntrack_max
Func ' * ' Call Sysctl set Net.nf_conntrack_max 15449
View all host uptime, turn on 5 threads to run asynchronously, the timeout time is 3 seconds, the command is as follows:
FUNC-T 3 "*" Call--forks= "5"--async command Run "/usr/bin/uptime"
Format the output, the default format for the Python tuple, add--jsion or--xml to output JSON and XML format, the command is as follows:
FUNC-T 3 "*" Call--forks= "5"--json--async command Run "/usr/bin/uptime"
Example: All the target hosts that meet the kernel version greater than or equal to 2.6, and the operating system information contains CentOS, run the uptime command
Func "*" Call--filter "Kernel>=2.6,centos in OS" command Run "uptime"
Example: All target hosts that meet the kernel version greater than or equal to 2.6, or run level equals 5 run the df-m command
Func "*" Call--filteror "kernel>=2.6,runlevel=5 in OS" command Run "df-m"

This article is from the "My Ops Road" blog, so be sure to keep this source http://pythonhome.blog.51cto.com/10015972/1622618

Func Common Operations Commands

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.