Systems - animeshtrivedi/notes GitHub Wiki
Bash Specific
Restricting CPU utilization of a process
cpulimit -l 50 -p 1234
How to check if a directory exists
https://stackoverflow.com/questions/59838/check-if-a-directory-exists-in-a-shell-script
Others
-
Using
perf top
generates lots of interrupts on the system. Up from 5K/sec to 135K/sec. So, don't use it when profiling. -
reset hung ssh terminal : http://askubuntu.com/questions/124699/why-does-gnome-terminal-freeze-when-an-ssh-session-gets-disconnected - call Enter + ~ + .
-
certificate extraction
openssl pkcs12 -clcerts -nokeys -in "YourPKCSFile" -out certificate.crt -password pass:PASSWORD -passin pass:PASSWORD
openssl pkcs12 -cacerts -nokeys -in "YourPKCSFile" -out ca-cert.ca -password pass:PASSWORD -passin pass:PASSWORD
openssl pkcs12 -nocerts -in "YourPKCSFile" -out private.key -password pass:PASSWORD -passin pass:PASSWORD -passout pass:TemporaryPassword
- setting up ssh key names https://askubuntu.com/questions/30788/does-ssh-key-need-to-be-named-id-rsa
sample config file
$cat .ssh/config
Host flex*
StrictHostKeyChecking no
IdentityFile ~/.ssh/demo
See java properties:
java -XshowSettings:properties