Linux环境下如何通过WMI对windows进行监控
来源:互联网 发布:dkms linux 编辑:程序博客网 时间:2024/06/05 21:11
以下内容使用到的一些工具请在http://download.csdn.net/detail/wqiancangq/9738919下载
Installation
Pre-requisites
$ sudo aptitude install autoconf
Compilation
WMIC is a useful tool in the world of remote management, and more specifically tracking the performance of Windows machines, so I thought I’d show how I got it installed on Ubuntu 12.04 LTS – Desktop. This should work fine on most other versions of Ubuntu as well, but please comment if it did not.
Step 1 – Install autoconf which is used in the compilation process
sudo apt-get install autoconf
Step 2 – Download the ‘wmic’ source (I will work in my ‘Downloads’ directory)
cd ~/Downloadswget http://www.openvas.org/download/wmi/wmi-1.3.14.tar.bz2
Step 3 – Untar the source
tar -xvf wmi-1.3.14.tar.bz2
Step 4 – Go into the directory and add a line of text to the top of ‘GNUmakefile’
#Go into the directory where the files were untarred tocd wmi-1.4.14/ #or whatever version you installed #Edit 'GNUmakefile' and add the following at the top (just after the License Info)ZENHOME=../..
Step 5 – Compile
sudo make #Now grab a magazine or something - this can take a few minutes #After a while you 'might' get something like this - I did.....cp: target `../../lib/python' is not a directorymake: *** [pywmi-installed] Error 1 #wmic is already compiled and usable at this stage so it's not an issue. Proceed to Step 6
Step 6 – Test wmic
#In the ~/Downloads/wmi-1.3.14/ directory you will find a file named 'bin'. Create a copy of this file and name it wmiccp bin wmic #Test it #./wmic -U[user]%[password] //[host/ip] "[WMI Query]"./wmic -Utestuser%tstpass //172.16.2.2 "SELECT * FROM Win32_OperatingSystem" #Output should be similar to this:CLASS: Win32_OperatingSystemBootDevice|BuildNumber|BuildType|Caption|CodeSet|CountryCode|CreationClassName|CSCreationClassName|CSDVersion|CSName|CurrentTimeZone|Debug|Description|Distributed|EncryptionLevel|ForegroundApplicationBoost|FreePhysicalMemory|FreeSpaceInPagingFiles|FreeVirtualMemory|InstallDate|LargeSystemCache|LastBootUpTime|LocalDateTime|Locale|Manufacturer|MaxNumberOfProcesses|MaxProcessMemorySize|Name|NumberOfLicensedUsers|NumberOfProcesses|NumberOfUsers|Organization|OSLanguage|OSProductSuite|OSType|OtherTypeDescription|PAEEnabled|PlusProductID|PlusVersionNumber|Primary|ProductType|QuantumLength|QuantumType|RegisteredUser|SerialNumber|ServicePackMajorVersion|ServicePackMinorVersion|SizeStoredInPagingFiles|Status|SuiteMask|SystemDevice|SystemDirectory|SystemDrive|TotalSwapSpaceSize|TotalVirtualMemorySize|TotalVisibleMemorySize|Version|WindowsDirectory\Device\HarddiskVolume1|3790|Uniprocessor Free|Microsoft(R) Windows(R) Server 2003, Enterprise Edition|1252|1|Win32_OperatingSystem|Win32_ComputerSystem||WIN2003-VM-HS|120|False||False|168|2|779280|2348260|3127540|20121101081525.000000+120|1|20121101090258.411875+120|20121105103817.505000+120|0409|Microsoft Corporation|4294967295|2097024|Microsoft Windows Server 2003 Enterprise Edition|C:\WINDOWS|\Device\Harddisk0\Partition1|5|46|4|Sintrex Integration Services (Pty) Ltd|1033|274|18|(null)|False|(null)|(null)|True|3|0|0|Test User|69763-011-6394922-43753|0|0|2527020|OK|274|\Device\HarddiskVolume1|C:\WINDOWS\system32|C:|0|3575072|1048052|5.2.3790|C:\WINDOWS
Step 7 – Copy wmic to /usr/bin so you can use it from anywhere
sudo cp wmic /usr/bin/
- Linux环境下如何通过WMI对windows进行监控
- 如何通过CuteFTP实现在windows环境下和Ubuntu进行文件相互传输
- 在linux环境下 通过示例对目录的三种权限进行幽默解读
- 安装cactiez v11对windows和linux系统进行监控
- windows下通过jconsole/jvisualvm监控linux下jvm状态
- windows下通过jconsole/jvisualvm监控linux下jvm状态
- 如何对网站进行监控
- Linux下,借助inotifywait工具,对文件目录进行监控
- Linux下使用Shell对网络流量进行监控
- windows下通过jconsole监控linux内存,cpu占用情况
- windows通过VisualVM远程监控linux下的tomcat
- linux环境下如何对oracle数据库进行整库备份
- Windows环境下对Apache进行源代码级跟踪调试
- Windows下对Sublime text2进行Python编译环境配置
- linux下通过tftp对板子进行的烧写
- Python对Windows服务进行监控
- linux系统环境下,对文件进行加密
- Linux环境下,用eclipse对ffmpeg源代码进行调试
- 搭建kindleEAR为kindle推送RSS订阅
- 【工业相机Pointgray配置VS2012】Pointgray配置VS2012并将Pointgray类型转换成Mat类型
- oc客服端向服务端传输数据的加密
- golang 设置web请求状态码
- html——跑马灯以及背景音乐的实现
- Linux环境下如何通过WMI对windows进行监控
- Struts2拦截器
- phpize找不到怎么办
- dubbo+zookeeper+Spring 单机配置步骤---【基础实践篇】
- [leetcode-485]Max Consecutive Ones
- [CloudReader]Android - 仿网易云音乐歌单详情页
- java设计模式——单例设计模式
- 关于SlidingMenu的一些改进写法,仿QQ5.0侧拉缩进
- Codeforces 8VC Venture Cup 2017 - Elimination Round D.PolandBall and Polygon