Notes on ScopePort

How to get information about your own process

by Lennart on Sep.02, 2008, under *NIX

If you want to get Information of your own process on a GNU/Linux system you should take a look at the /proc/self/ pseudo-directory. This directory contains information of the process that is reading it. You could also find out the PID of the process and read files in the /proc/[PID]/ directory. However, the /proc/self/ directory always keeps information of the process that is reading it.

Take a look at the proc manual pages to get an explanation of the files. (man proc) The most interesting may be /proc/self/status. It is a human readable version of the most values from /proc/self/stat and /proc/self/statm.

The /proc/ directory should be well known by every GNU/Linux system programmer as it contains a lot of useful information about your system and your processes.

Share:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • LinkedIn
  • StumbleUpon
  • Technorati
  • Yigg
  • FriendFeed
  • Identi.ca
  • MySpace
  • TwitThis

Leave a Reply

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!