Skip to content

{ Category Archives } Tips

Linux pstree

#pstree –help
I didn’t realize this before, but you can get an SELinux security context listing based on running processes with the Linux pstree command.
# pstree -n -p -Z

init(1,`system_u:system_r:init_t’)
├─httpd(5396,`user_u:system_r:initrc_t’)
│ ├─httpd(5398,`user_u:system_r:initrc_t’)
│ ├─httpd(5399,`user_u:system_r:initrc_t’)
│ ├─httpd(5400,`user_u:system_r:initrc_t’)
│ ├─httpd(5401,`user_u:system_r:initrc_t’)
│ ├─httpd(5402,`user_u:system_r:initrc_t’)
│ ├─httpd(5403,`user_u:system_r:initrc_t’)
│ ├─httpd(5404,`user_u:system_r:initrc_t’)
│ └─httpd(5405,`user_u:system_r:initrc_t’)
├─sunbird(7502,`user_u:system_r:unconfined_t’)
[...]

Fedora 8 and xbindkeys

I found a cool keyboard shortcut utility today for Fedora. For some reason the mute shortcut of CTRL + T on the Gnome volume applet wasn’t working. I like to stream news or music sometimes outside of my usual Amarok music collection, but I wasn’t able to mute the volume when I received a phone [...]

Graph Linux CPU load across SNMP with MRTG

Here’s an example of how to graph CPU load across SNMP using MRTG on Linux. Of course, this implies that you have MRTG running, and SNMP installed and running on Linux hosts. Install net-snmp if you don’t already have SNMP running on the host(s).

Target[host_cpu]: 1.3.6.1.4.1.2021.11.50.0&1.3.6.1.4.1.2021.11.50.0:comm@host +
1.3.6.1.4.1.2021.11.52.0&.1.3.6.1.4.1.2021.11.52.0:comm@host +
1.3.6.1.4.1.2021.11.51.0&.1.3.6.1.4.1.2021.11.51.0:comm@host
MaxBytes[host_cpu]: 100
Title[host_cpu]: CPU LOAD
PageTop[host_cpu]: <H1>Active CPU Load </H1>
Unscaled[host_cpu]: ymwd
ShortLegend[host_cpu]: [...]

Windoze/SAVCE tip of the day

I’ve always read the horror stories about Symantec customers being hosed at some point on their networks during the course of updates and patches. Well, up until yesterday and today, I’ve never had a problem with their Corporate Edition software, and have been running it since version 8. We’re now up to 10. Anyways, I [...]

Thanks nothink.org for snmpcheck

I’ve exchanged quite a few e-mails the past month with the maintainer of nothink.org about a Perl script he wrote called snmpcheck. This scripts gathers all kinds of information from Windows, Linux, Cisco, printers, switches, firewalls, and whatever else you have running SNMP on. It’s pretty cool. I use it in a script which runs [...]