Skip to content

rohitaryal/pxplorer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pxplorer

A simple process explorer implemented for linux with zero third party dependency

Build

  • Clone the repo:
git clone https://github.com/rohitaryal/pxplorer.git
cd pxplorer
go build -o px ./cmd/pxplorer/main.go
chmod +x px
  • Or get pre-built binaries from the releases

Usage

  • Basic usage:
px # List all process with same euid and ppid as mine

# PID     NAME    COMMAND
# 11460   zsh     /usr/bin/zsh 
# 23785   px.exe  ./px.exe 
  • Inspecting self:
px --self

# 23849   px.exe  ./px.exe --self 
# ├─ /dev/pts/1
# ├─ /dev/pts/1
# ├─ /dev/pts/1
# ├─ pipe:[130810]
# ├─ pipe:[130810]
# ╰─ anon_inode:[eventpoll]
  • Get information from specific pid
px --pid 728

# 728 warp-svc /bin/warp-svc
  • Kill a process?
px --kill 728

# Killed pid 728
  • Search for a opened file?
px --search secret
# 25074 nvim nvim --embed secret.txt
# ├─ /dev/null
# ├─ /dev/pts/3
# ├─ /dev/pts/3
# ├─ /dev/pts/3
# ├─ pipe:[133122]
# ├─ pipe:[133122]
# ├─ pipe:[133125]
# ├─ pipe:[133125]
# ├─ pipe:[129966]
# ├─ pipe:[129966]
# ├─ pipe:[129967]
# ├─ pipe:[129967]
# ├─ socket:[137569]
# ├─ socket:[137571]
# ├─ socket:[129970]
# ├─ anon_inode:[eventfd]
# ├─ anon_inode:[io_uring]
# ├─ anon_inode:[eventpoll]
# ╰─ /home/erucix/.local/state/nvim/swap/%tmp%secret.txt.swp
  • Full usage?

Try the --help flag

pxplorer: Simple process explorer for linux

  -all
        List all processes
  -everything
        List all + opened files for all process
  -kill int
        Specify a processs PID to kill (default -1)
  -pid int
        Process id (default -1)
  -search string
        Search for opened files (case insensetive)
  -self
        Inspect pxplorer itself while running

Conclusion

This is just for learning purpose and not a replacement or alternative for ps not even close

About

A simple process explorer implemented for linux with zero third party dependency

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages