michael_dmt
Posts: 6
Joined: Mon Oct 17, 2016 11:17 am

Server monitoring using RPi 2

Tue Dec 27, 2016 9:12 am

Hello, I'm currently undergoing a course that needs to develop a project and I've been looking into developing a project of RPi 2 since I have one.

I successfully wrote scripts in python to check the availability of a server (by pinging the server for a certain time in a while) and am now wondering if anyone knows how to check the CPU usage of the server. I want to get the data of CPU usage of the server which from different machine from RPi 2. It would be great if the usage can be retrieved in percentage.

Thank you.
Last edited by michael_dmt on Sat Dec 31, 2016 8:23 pm, edited 1 time in total.

drgeoff
Posts: 10832
Joined: Wed Jan 25, 2012 6:39 pm

Re: Server monitoring using RPi 2

Tue Dec 27, 2016 10:53 am

You are supposed to be learning how to implement that yourself, not looking for someone else's work to copy.
Quis custodiet ipsos custodes?

CCIEliu
Posts: 1
Joined: Fri Dec 30, 2016 2:52 am

Re: Server monitoring using RPi 2

Fri Dec 30, 2016 3:22 am

Maybe you need SNMP....

michael_dmt
Posts: 6
Joined: Mon Oct 17, 2016 11:17 am

Re: Server monitoring using RPi 2

Sat Dec 31, 2016 8:18 pm

drgeoff wrote:You are supposed to be learning how to implement that yourself, not looking for someone else's work to copy.
I'm not looking for someone else's work to copy, but I'm looking for example which can help me understand how to do it. I'm new to RPi, still learning and am looking for solution if I can't do the stuff, that is the reason I posted a thread here, to get help.

pcmanbob
Posts: 9612
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Server monitoring using RPi 2

Sat Dec 31, 2016 10:14 pm

If you want to understand how to check if a server is up, have a look at this project it checks to see if your internet is up, how does it do it ? by checking a server is reachable via the internet.
http://www.instructables.com/id/Raspber ... t-Monitor/

If you want to find examples like this, try doing a google search there is plenty of information out there, its the first thing I do if I run up against a problem when writing scripts/programs.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

peterlite
Posts: 720
Joined: Sun Apr 17, 2016 4:00 am

Re: Server monitoring using RPi 2

Sat Dec 31, 2016 11:02 pm

The server needs SNMP software active and authorised to feed out to your machine. Google SNMP and your server OS. Ask the server admin for permission. When you have the SNMP protocol working, you can ask the server anything, disk space usage, temperature, you can ask it out for a date. :D

michael_dmt
Posts: 6
Joined: Mon Oct 17, 2016 11:17 am

Re: Server monitoring using RPi 2

Mon Jan 16, 2017 9:14 pm

pcmanbob wrote:If you want to understand how to check if a server is up, have a look at this project it checks to see if your internet is up, how does it do it ? by checking a server is reachable via the internet.
http://www.instructables.com/id/Raspber ... t-Monitor/

If you want to find examples like this, try doing a google search there is plenty of information out there, its the first thing I do if I run up against a problem when writing scripts/programs.
Thanks!

michael_dmt
Posts: 6
Joined: Mon Oct 17, 2016 11:17 am

Re: Server monitoring using RPi 2

Mon Jan 16, 2017 9:14 pm

peterlite wrote:The server needs SNMP software active and authorised to feed out to your machine. Google SNMP and your server OS. Ask the server admin for permission. When you have the SNMP protocol working, you can ask the server anything, disk space usage, temperature, you can ask it out for a date. :D
Great! Thanks!

Return to “Networking and servers”