I want to get the system memory usage (and also HDD space info) in PHP. Is there any way to do without invoking commands using system
calls?
Note: I am not looking for the script memory usage, but the system memory usage.
On Linux, you can read /proc/meminfo
to get information on total and available system memory (just cat /proc/meminfo
-- it's a simple text file you can easily parse).
I'm not sure you can get filesystem information from procfs, by try looking at /proc/sys/fs
for interesting information.