Post thumbnail of Handle command line arguments with getopt in Python
29 December 2009
Continue reading Handle command line arguments with getopt in Python

Handle command line arguments with getopt in Python

Here’s a way to use getopt to handle arguments when creating command line applications. It works quite well with the standard help (–help or -h) by showing usage when bad arguments are passed.

Post thumbnail of Brute force restarting of services on a machine under heavy load in response to the slashdot effect
30 October 2009
Continue reading Brute force restarting of services on a machine under heavy load in response to the slashdot effect

Brute force restarting of services on a machine under heavy load in response to the slashdot effect

So, for a single core single processor machine a load average of 1 means that on average there’s a process in the running or runnable state at all times. This means the CPU average is at 100% too. If another process wants to run, it has to wait in the queue before being executed. For a multi-core or multi-processor system, you’re not CPU bound until the load average equals the total number of cores. You can calculate a system’s CPU utilization by dividing the load average by the number of processors you see in /proc/cpuinfo

Powered by Wordpress   |   Lunated designed by ZenVerse