分类:
2012-01-19 13:51:17
原文地址:FUNC 使用指南(转) 作者:solaris小兵
Certmaster Func
certmaster-ca --list-sign 或 ls /var/lib/certmaster/certmaster/certs/
certmaster-ca -c hostname 或 rm /var/lib/certmaster/certmaster/certs/hostname.cert
rm /var/lib/certmaster/certmaster/certs/hostname.cert
CommandModule -- Running Arbitrary Commands Like SSH Does IPtablesModule -- iptables management NetworkTest -- Test out network stuff. ProcessModule -- Process Info, memory usage, and Killing ServiceModule --Service Status and Control JBossModule -- monitoring and control jboss instances HardwareModule -- Hardware Profilling MountModule -- mount, unmount, and query mounted resources NagiosCheck -- be able to call Nagios plugins and get their results,without needing to install nagios. Works with any plugin
func hostname call command run command
func ’ssh-1′ call command run /usr/bin/uptime
func ’ssh-1′ call command run “date -s 09:47:40“
func ’ssh-1′ call command run “hwclock -w“
func “ssh-1″ call command run “cat /proc/cpuinfo” 不过排列不好看
Func hostname call service start/stop/restart servername
func ssh-1 call service start httpd
func ssh-1 call service stop sendmail
Func ssh-1 call service restart named
func hostname call hardware info
-例:
func ’ssh-1′ call hardware info
如果不能执行一般是因为 smolt 没有安装
func hostname call iptables command
func “ssh-1″ call iptables policy func “ssh-1″ call iptables dump func “ssh-1″ call iptables.port drop_to 53 192.168.0.0/24 udp src
func ’ssh-1′ call iptables run “-L INPUT” func ’ssh-1′ call iptables policy OUTPUT DROP func ’ssh-1′ call iptables drop_from 192.168.0.10
func hostname call jboss command
func “*” call jboss status
func “*” call jboss check
func “*” call jboss search_by_instance “default“
func “*” call jboss search_by_address “127.0.0.1“
func “*” call jboss search_by_port 8080
Func hostname call process command
func ssh-1 call process info “aux”
func ssh-1 call process mem
func ssh-1 call process kill httpd SIGHUP
Func hostname call sysctl command
func ssh-1 call sysctl list
func “*” call sysctl get
func ssh-1 call sysctl set net.ipv4.tcp_syncookies 1
func ssh-1 call rpms inventory
func ssh-1 call smart info
func ssh-1 call yumcmd update
func ssh-1 call command run ‘yum update’