Check These Out
For each cpu set mask and then monitor your cpu infos. Temp,load avg. etc.
For example for 2nd cpu or 2nd core
taskset 0x00000002 yes > /dev/null &
For example for 3rd cpu or 3rd core
taskset 0x00000004 yes > /dev/null &
For example for 4th cpu or 4th core
taskset 0x00000008 yes > /dev/null &
Monitor your cpu temp with this command if you want
watch -n1 "acpi -t"
Load avg. from top command
top
kerim@bayner.com
http://www.bayner.com/
Excludes other mountpoints with acavagni's "mountpoint" idea, but with -exec instead of piping to an xargs subshell. Then, calling "du" only once with -exec's "+" option. The first "\! -exec" acts as a test so only those who match are passed to the second "-exec" for du.
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
For example, to remove line 5 from foo, type: vi +5d +wq foo
I use zgrep because it also parses non gzip files.
With ls -tr, we parse logs in time order.
Greping the empty string just concatenates all logs, but you can also grep an IP, an URL...
required packages: curl, xml2, html2text
command is truncated, see 'sample output'
By default bash history of a shell is appended (appended on Ubuntu by default: Look for 'shopt -s histappend' in ~/.bashrc) to history file only after that shell exits.
Although after having written to the history file, other running shells do *not* inherit
that history - only newly launched shells do.
This pair of commands alleviate that.