hello-rust / show

🍿 Show notes, code, and future topic ideas for "Hello Rust!", a YouTube channel about the Rust programming language.

Home Page:https://hello-rust.show

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A simple `ps` clone

mre opened this issue · comments

What?

The Unix tool ps lists the status of processes. We could write one in Rust.

Why?

Implementing Unix tools is a good learning experience.
ps in particular makes use of the /proc virtual filesystem to get information
straight from the Linux kernel. (I have no idea how it works on other systems.)
This directory contains a wealth of data that is interesting to explore.

How?

Read /proc/<pid>/status and parse it using serde/nom or something else.