Asked  2 Years ago    Answers:  5   Viewed   84 times

How does VBulletin get the system information without the use of exec? Is there any other information I can get about the server without exec? I am interested in:

  • bandwidth used
  • system type
  • CPU speed/usage/count
  • RAM usage



Use PHPSysInfo library

phpSysInfo is a open source PHP script that displays information about the host being accessed. It will displays things like:

  • Uptime
  • CPU
  • Memory
  • Ethernet
  • Floppy
  • Video Information

It directly parsed parses /proc and does not use exec.

Another way is to use Linfo. It is a very fast cross-platform php script that describes the host server in extreme detail, giving information such as ram usage, disk space, raid arrays, hardware, network cards, kernel, os, samba/cups/truecrypt status, temps, disks, and much more.

Sunday, November 13, 2022

The psutil library gives you information about CPU, RAM, etc., on a variety of platforms:

psutil is a module providing an interface for retrieving information on running processes and system utilization (CPU, memory) in a portable way by using Python, implementing many functionalities offered by tools like ps, top and Windows task manager.

It currently supports Linux, Windows, OSX, Sun Solaris, FreeBSD, OpenBSD and NetBSD, both 32-bit and 64-bit architectures, with Python versions from 2.6 to 3.5 (users of Python 2.4 and 2.5 may use 2.1.3 version).

Some examples:

#!/usr/bin/env python
import psutil
# gives a single float value
# gives an object with many fields
# you can convert that object to a dictionary 
# you can have the percentage of used RAM
# you can calculate percentage of available memory
psutil.virtual_memory().available * 100 / psutil.virtual_memory().total

Here's other documentation that provides more concepts and interest concepts:

Saturday, December 3, 2022

There is an open source library that gives these (and more system info stuff) across many platforms: SIGAR API

I've used it in fairly large projects and it works fine (except for certain corner cases on OS X etc.)

Thursday, August 25, 2022

Got it working. Used pretty much the same code as found here: Turns out I had a bad path, which i finally got sorted out: new ManagementPath(string.Format("\{0}rootcimv2",machineName));

Tuesday, November 8, 2022

This is a known issue. To use a hdd in the DVD slot, you used a HDD caddy. In some cases you get a high CPU usage caused by the ACPI.sys driver.

You have to look if your caddy has a jumper and if yes, change the position of the jumper.

This fixes the CPU usage. If you don't have a jumper, buy a caddy which has such a jumper.

Tuesday, August 9, 2022
Only authorized users can answer the search term. Please sign in first, or register a free account.
Not the answer you're looking for? Browse other questions tagged :

Browse Other Code Languages