Check These Out
Want to know why your load average is so high? Run this command to see what processes are on the run queue. Runnable processes have a status of "R", and commands waiting on I/O have a status of "D".
On some older versions of Linux may require -emo instead of -eo.
On Solaris: ps -aefL -o s -o user -o comm | egrep "^O|^R|COMMAND"
You might want to secure your AWS operations requiring to use a MFA token. But then to use API or tools, you need to pass credentials generated with a MFA token.
This commands asks you for the MFA code and retrieves these credentials using AWS Cli. To print the exports, you can use:
`awk '{ print "export AWS_ACCESS_KEY_ID=\"" $1 "\"\n" "export AWS_SECRET_ACCESS_KEY=\"" $2 "\"\n" "export AWS_SESSION_TOKEN=\"" $3 "\"" }'`
You must adapt the command line to include:
* $MFA_IDis ARN of the virtual MFA or serial number of the physical one
* TTL for the credentials
Change the name of the process and what is echoed to suit your needs. The brackets around the h in the grep statement cause grep to skip over "grep httpd", it is the equivalent of grep -v grep although more elegant.
Unset TMOUT or set it to 0 in order to prevent shell autologout. TMOUT is the number of seconds after which the present shell will be killed if it has been idle for that long.
Very useful for finding all files over a specified size, such as out of control log files chewing up all available disk space. Fedora Core x specific version.
Trace python statement execution and syscalls invoked during that simultaneously
Shows all block devices in a tree with descruptions of what they are.
History usually only gives the command number and the command. This will add a timestamp to the history file.
Note: this will only put the correct timestamp on commands used after the export is done. You may want to put this in your .bashrc
The original was a little bit too complicated for me. This one does not use any variables.