Skip to content

HunterDavis.com

Menu
  • Home
  • Projects
  • Archive
  • My Story
  • Leadership and Public Speaking
  1. Home
  2. 2007
Shell Script to Monitor PID cpu usage over time Hunter Davis

Shell Script to Monitor PID cpu usage over time

December 19, 2007 ~1 min read

Tagged: linux shell scripts programming

Sometimes I feel like all the world’s problems can be solved with shell scripts. Here’s one that’s short and sweet. You give it a PID, interval, and outfile, and it keeps track of the PID given till the PID dies (or you kill the script). These values are plotted against time with gnuplot. I wrote it while keeping an eye on ‘top’ on a server. Snag it here

PreviousPing Rebooter NextBuilding a completely automated, web/ssh/vnc controlled, home automation server from a clamshell ibook (with a faulty cd drive) and 10$ worth of elect

Related by tag

  • Half a line of shell to display to screen while compressing output... The most useful shell I've written in forever
  • Advanced Tips - Fun with VNC
  • A Programmer's Window Manger - Testing the Notion Window Manager
  • Food (and diet) management for the unix geek, a python script
  • Ping Rebooter

More from 2007

  • Easy Execution Library - c++ class library for spawning processes
  • Casey on youtube!
  • Re-Writing the laser pointer paint program (image processing) in C/C++ - 10x speed improvement
  • Home Automation + Gmail in Ubuntu
  • Using scilab video processing toolbox and a laser pointer to "paint" a scene in realtime.

Browse

  • Home
  • Timeline
  • Archive (by year)
  • Tags (by topic)
  • Projects
  • Full site map

About

  • My Story
  • Leadership & Public Speaking
  • Random post
  • Search

Subscribe

  • RSS (excerpts)
  • RSS (full content)
  • XML sitemap (for crawlers)
  • Email

Off-site

  • GitHub
  • LinkedIn
  • Hacker News

© 2007–2026 HunterDavis.com · Powered by Jekyll

Hunter Davis GitHub LinkedIn Hacker News