How to monitor remote Linux machines and retrieve installed software in Perl?

I have a couple of Perl scripts that allow me to monitor remote Windows machinses through WMI. Right now I can check CPU usage, Memory usage, Disk usage and Installed Software. But what if I want to do the same job on a remote Linux machine? Ofcourse there's no WMI so I guess I shall use something similar. I have read on another old StackOverflow question that Linux exposes informations through /proc and /sys but can I query them from a remote computer? And how can I do that exactly in Perl? Is there a dedicated module?

EDIT: Just to clarify, the script MUST be agent-free.


Check these :

This will give you memory / disk usage :

snmptable -v1 -c public localhost hrStorageTable
snmptable -v1 -c public localhost .

This will give you processor utilisation :

snmptable -v1 -c public localhost hrProcessorTable
snmptable -v1 -c public localhost .

Interface Status :

snmptable -v1 -c public localhost ifTable
snmptable -v1 -c public localhost .

If you use rpm-based linux, this will give you installed software :

snmptable -v1 -c public localhost hrSWInstalledTable
snmptable -v1 -c public localhost .

You can make this work for .deb flavours of linux :

Sample output of `snmptable -v1 -c public localhost hrProcessorTable`

        hrProcessorFrwID hrProcessorLoad
 SNMPv2-SMI::zeroDotZero              54
 SNMPv2-SMI::zeroDotZero              22

On the box you are querying, does public have read access to . ?

You may need to add something like this to your /etc/snmp/snmpd.conf

com2sec monitor  default         monitor

group monitorGroup v1      monitor
group monitorGroup v2c     monitor

view hardware included .
view hardware included .

access monitorGroup ""      any       noauth    exact  hardware    none    none

The restart snmpd

Then specify -c monitor in the commands above instead of -c public

Need Your Help

Global struct memory error

c struct heap valgrind libconfig

My program's reading from config file using libconfig and saving values to the global struct. It's working fine but valgrind says there's error. And the error only shows for char pointer variable. ...

PDO Connection First Query Delay

php mysql pdo

I have a site which uses PHP's PDO library to access a mysql database. The mysql database is highly optimised and has all the suitable indexes to make the queries fast and so on. I am encountering ...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.