I am developing a server monitoring application. I need to get the memory usage of the system with out using the "psutil" package. Is there a way to do it in python?
Asked
Active
Viewed 277 times
0
-
Any other packages allowed? Or do you have to use onboard tools? Windows or Linux? – Joe Aug 22 '18 at 12:48
-
@Joe not supposed to use packages. i am developing for linux and windows system – Harshith Aug 22 '18 at 12:51
-
https://stackoverflow.com/questions/17718449/determine-free-ram-in-python – Joe Aug 22 '18 at 12:53
-
Or answers in this question that use `free`. https://stackoverflow.com/questions/276052/how-to-get-current-cpu-and-ram-usage-in-python – Joe Aug 22 '18 at 12:54
-
@Joe how to do it for windows platform? – Harshith Aug 22 '18 at 13:02
-
parse out of `systeminfo` or `wmic OS get FreePhysicalMemory /Value` – Joe Aug 22 '18 at 13:09
-
@Joe Do you have any example code for the same? I am new to coding. – Harshith Aug 22 '18 at 13:15
-
No, but the approach is similar to the code in the links I send. You only need to adapt it slightly. – Joe Aug 22 '18 at 13:20