Linux Machine First installs wmi-1.3.14.tar.bz2
TAR-JXVF wmi-1.3.14.tar.bz2
CD wmi-1.3.14
Make
CP samba/source/bin/wmic/usr/local/bin/
Pass parameter information through the file into the script and get the output
Wmi.sh ————————————————————
#cat/mess/host|while Read Line;do
Cat/mess/host| While Read line
Do
Key1= ' echo $line |cut-d \:-F 1 '
Key2= ' echo $line |cut-d \:-F 2 '
Key3= ' echo $line |cut-d \:-F 3 '
Key4= ' echo $line |cut-d \:-F 4 '
Key5= ' echo $line |cut-d \:-F 5 '
# echo $key 1 $key 2 $key 3 $key 4 $key 5
echo $key 4----------$key 5-----------' Date '
Wmic-u $key 1/$key 2% $key 3//$key 4 "$key 5"
Done
#key1 = ' cat $line |cut-d \:-F 1 '
#echo $key 1
#key2 = ' cat/mess/host|cut-d \:-F 2 '
#key3 = ' cat/mess/host|cut-d \:-F 3 '
#key4 = ' cat/mess/host|cut-d \:-F 4 '
#key5 = ' cat/mess/host|cut-d \:-F 5 '
#key2 = ' cat/mess/host|cut-d \:-F 2 '
#print Key1
#wmic-U $key 1/$key 2% $key 3//$key 4 "$key 5"
/mess/host file host information, command information
Warefont.com:administrator:[email Protected]:192.168.100.48:select caption, name, Parentprocessid, ProcessID from Win32_Process
Warefont.com:administrator:[email Protected]:192.168.100.49:select caption, name, Parentprocessid, ProcessID from Win32_Process
Shell and WMI get Windows performance