Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how do i get system stats in PHP

i am launching a beta version of a web app and i want to log system information about resources. system monitors eat up way too much resources and do a lot more than what i need. What i want to do is get key stats and log them every time a user logs in.

these are the stats i am interested in:

  • number of users - i have done this already
  • system 5 min and 15 min loads - php's get load average
  • outgoing bandwidth on eth0 - ????
  • free memory - ????

so how do i get outgoing traffic and free memory statistics?

like image 724
vasion Avatar asked Apr 07 '26 23:04

vasion


1 Answers

If you want to see how it's done, have a look at phpSysInfo.

like image 162
wimvds Avatar answered Apr 10 '26 13:04

wimvds



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!