A clone of unix ps program
Ruby
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
bin
lib
spec
.gitignore
.rspec
Gemfile
Gemfile.lock
README.md
Rakefile
main.rb

README.md

ps-clone

A clone of unix ps program - reports a snapshot of the current processes; including: Pid user state and memory consumption

   PID	NAME           	USER      	STATE     	MEMORY    
------	---------------	----------	----------	----------
     1	systemd        	root      	S (sleeping)	 4316 kB
     2	kthreadd       	root      	S (sleeping)	
     ...

Install

bundle install

Run

Executable is bin/ps.rb

Proc Filesystem

All processes are read from Linux /proc folder. Every Pid subfolder contains data for each running process, general data can be found in file /proc/<pid>/status