Oct 5, 2016

[memo] How to check max open files(file descriptors) in Linux

Entire OS

cat /proc/sys/fs/file-max


Max open file number of each process
ps aux | grep glassfish
#find process id(pid)
grep "open files" /proc/10244/limits
Max open files            65535                65535                files

Mar 15, 2016

[memo] How to delete all jobs of jenkins

Delete all jobs

Go to the following URL.
http://your.jenkins.url/script

And input the following script

for(j in jenkins.model.Jenkins.getInstance().getProjects()) {
    j.delete();
}

http://stackoverflow.com/questions/5076246/hudson-ci-how-to-delete-all-jobs

Sep 13, 2015

[memo] How to keep SSH session from disconnection in Mac

Set 5 minutes for interval.

vi ~/.ssh/config
ServerAliveInterval 300
TCPKeepAlive yes

Jun 15, 2015

[memo] How to show only total for each directories

du -csh *

The -c option can be added to provide a grand total for all of the files and directories that are listed.
The -s (for suppress or summarize) option tells du to report only the total disk space occupied by a directory tree and to suppress individual reports for its subdirectories.
The -h (i.e., human readable) can make the output easier to read by displaying it in kilobytes (K), megabytes (M) and gigabytes (G) rather than just in the default kilobytes.

Reference
http://stackoverflow.com/questions/10103604/linux-command-line-du-how-to-make-it-show-only-total-for-each-directories

Dec 9, 2014

[memo] How to change a git URL in all Jenkins jobs

Each job's configuration is saved at config.xml. So you just find old URL and change them to new URL like the below.


Sep 9, 2014

[memo] How to get hostname with logback

Just use ${HOSTNAME} logback can get hostname. Don't set hostname manually. It may make other engineers try to fix problem on other server. It's my experience. :)