jstat - jvm memory stats

Posted on Wed 27 October 2010 in Linux • Tagged with java, tools, linux, notepad • 1 min read

/usr/java/jdk1.5.0_22/bin/jstat -gcutil 18703 1s 10

gcutil = Summary of Garbage Collection Statistics (mandatory)
18703 = process id (mandatory)
1s = refresh interval (optional)
10 = counter (optional)

$ /usr/java/jdk1.5.0_22/bin/jstat -gcutil 25532 1s 10
  S0     S1     E      O      P     YGC     YGCT    FGC    FGCT     GCT …

Continue reading

IPv6 Adressen

Posted on Tue 26 October 2010 in IPv6 • Tagged with ipv6, notepad • 1 min read

Bahn-Streiks sind was tolles...da schafft man was :)

Aufbau einer IPv6 Adresse

128 Bit insgesamt. Die ersten 64-Bit sind für das Subnetz-Präfix reserviert, gefolgt von den letzten 64-Bit für den Host.

nnnn:nnnn:nnnn:nnnn:hhhh:hhhh:hhhh:hhhh

Jeder Block ist 16-Bit lang. Nullen am Anfang eines Blockes können …


Continue reading

Apache Tomcat & logrotate

Posted on Tue 31 August 2010 in Linux • Tagged with Server, SUSE Linux Enterprise Server, Linux, work, notepad • 1 min read

Some linux distribution are shiped without a config for the catalina.out (Tomcat application server) ;)

$ cat /etc/logrotate.d/tomcat
/var/log/tomcat/base/catalina.out {
    compress
    copytruncate
    create 644 tomcat tomcat
    rotate 30
    size 4M
}

The catalina.out will be rotated after 4 mb and stored for 30 days …


Continue reading

How to delete a command from the bash history / Hide an command from the bash history

Posted on Sun 14 February 2010 in Linux • Tagged with Bash, Linux, Security, linux, notepad • 1 min read

Hide an command from the bash history:
Start a terminal and try

wget user:passwd@ftp.example.com/secret.tar.gz; kill -9 $$;

Now you can check your history ;)

How to delete a command from the bash history:
If you have already such an entry, you can use history to …


Continue reading

lvm is not a clvm ;)

Posted on Wed 02 December 2009 in Linux • Tagged with Cluster, Linux, LVM, notepad • 1 min read

LVM is not cluster aware so be very careful !

Steps to make changes on a (shared-) lvm:

  1. other nodes: # vgchange -an
  2. master node: make changes like # lvrename
  3. other nodes: # vgscan; vgchange -ay

Thats on only necessary if you have a shared storage like drbd or a SAN ;)