Is there any system function/api to get values like /proc/<pid>/status ???
Hello All,
I want memory log of my application and for that i want any system function that will give information similar to /proc/<My_App_Pid>/status. basically i need all Virtual memory values like VmSize, VmPeak, VmRSS etc. and number of threads running. Regards Kunal Nandi |
Nope. You don't need one. The proc filesystem is "in storage" and ascii, so a standard read of it is really efficient.
All of the utilities that I've ever seen that access the proc filesystem use standard open/read/close. Here's a function that'll work. Code:
static int read_proc_file(char *file_name, char *buffer, int size) |
actually i hv already tried this before but, i was looking for some system function any ways thanks for your reply
Quote:
Kunal Nandi |
All times are GMT -5. The time now is 05:06 PM. |