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.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
On Linux, you can read
/proc/meminfoto get information on total and available system memory (justcat /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/fsfor interesting information.