Check These Out
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"
I have used single packet, and in a silent mode with no display of ping stats. This is with color and UI improvement to the http://www.commandlinefu.com/commands/view/10220/check-if-a-machine-is-online. It is as per the enhancements suggested.
Measure the cpu performance:
In-case if the cpu is thermal throttling then you can find it using this command.
Check the first line of the output.
Example:
Doing md5 for 3s on 16 size blocks: 11406892 md5's in 2.98s ? #(When cpu is not throttling)
Doing md5 for 3s on 16 size blocks: 110692 md5's in 2.98s ?? #(When cpu is thermal throttling)
Practical use case:
Once we had cooling outage in data center which caused thermal throttling in some of the worker nodes. We used this tool to prove that some servers are not performing well because of the cpu thermal throttling.
It works best as part of a function, such as the following:
MUSICROOT=~/Music
function fplay {
if [ $1 = '-v' ]; then
shift 1
find -E $MUSICROOT -type f -iname "*$**" -iregex '.*\.(3g[2|p]|aac|ac3|adts|aif[c|f]?|amr|and|au|caf|m4[a|r|v]|mp[1-4|a]|mpeg[0,9]?|sd2|wav)' -print -exec afplay "{}" \; &
else
find -E $MUSICROOT -type f -iname "*$**" -iregex '.*\.(3g[2|p]|aac|ac3|adts|aif[c|f]?|amr|and|au|caf|m4[a|r|v]|mp[1-4|a]|mpeg[0,9]?|sd2|wav)' -exec afplay "{}" \; &
fi
}
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"
You can also do this for seconds, minutes, hours, etc... Can't use dates before the epoch, though.
A *.tar.gz file needs to be unzipped & then untarred. Previously I might have unzipped first with
$gunzip -d file.tar.gz
and then untarred the result with
$tar -xvf file.tar
(Options are extract, verbose, file)
Using the -z (decompress) option on tar avoids the use of gzip (or gunzip) first.
Additionally the -C option will specify the directory to extract to.
In this example, file contains five columns where first column is text. Variance is calculated for columns 2 - 5 by using perl module Statistics::Descriptive. There are many more statistical functions available in the module.
Lists all installed kernels minus the current one. This is useful to uninstall older kernels that take too much space on /boot partition.
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"