I mentioned pscpug over a month ago, as a neat, vertically scrolling CPU monitor that required very little in the way of system overhead or terminal real estate. You can get something like that from cpubar, which is itself an offshoot of dbar.
Showing you one — and in this case, that’s cpubar, modified slightly for terminal width and the display character — is showing you both of them, since they are tightly related. dbar can stand alone or work as a progress bar with other applications, or be modified or injected into other arenas.
Neither one comes with a makefile or any additional components; click on the download links on the home page, and you get the raw .c file … only. You’re signing on for about 4Kb apiece for the pure code though, and I’m fairly sure you can afford it.
It does also make me curious as to why dbar is bundled in Debian. Seeing how the i386 package expands to about 10 times what the raw downloadable takes, this might be one of those very, very few times when you’re doing just as well to download and build it yourself.
In any case, it’s not in Arch or AUR, which is probably more of an oversight than any statement about inflating tiny programs by bundling them in your distro. If you feel like adopting a terribly simple application and adding it to AUR, this would be an easy one.
Speaking directly to cpubar, you have the option (as I hinted) to stretch the bar to a specific length, given in characters. You can also adjust the interval and select a specific character to show. There are no allowances for color, but I’m sure one of you talented C wizards can come up with a solution to that in about an hour.😉
I don’t have any complaints about cpubar (or dbar, for that matter), except to mention that the character count given as a flag is for the length of the bar only, and not your terminal width. In other words, you have to mentally subtract the 12 characters that are shown statically by cpubar, if you want it to fit neatly into a terminal space. It’s not the way I would have written it, but there’s a lot here that can be adjusted to your liking.
And so, in closing, if you’re wondering what use cpubar (or maybe even dbar) could be, think about a two-line terminal emulator pressed against the root window, showing CPU load at a two-second interval. Or if you’re feeling really ambitious, jam it into conky … or maybe conconky.
That should keep you busy for a while.😉