Posts

Showing posts from May, 2014

Install monitoring Utilities like "sar" and "iostat" in Debian Based Distros

Image
Today, I was looking for "sar" (Report System and CPU performance) and "iostat" (Report Disk and IO Performance) on Debian Based Distro i.e. lubuntu. But didn't find the command, infact it gives me hint that which package contain this command. root@lubuntu1:~# iostat The program 'iostat' is currently not installed. You can install it by typing: apt-get install sysstat root@lubuntu1:~# Another, option if you want to know about that which package may contain specific command, just make use of "apt-cache". Just run below command to find out the related packages. Here, I am looking for "iostat". root@lubuntu1:~# apt-cache search iostat sysstat - system performance tools for Linux dstat - versatile resource statistics tool ganglia-modules-linux - Ganglia extra modules for Linux (IO, filesystems, multicpu) ifstat - InterFace STATistics Monitoring nicstat - print network traffic statistics pcp-import-iostat2pcp - Tool for import...

How to take JVM Heap Dump using jmap

We have different options for taking a heap dump of running JAVA process and then analyze those dump for any kind for memory leak. Today, We are going to do the same using " jmap " in-built utility provided with JDK. Using this you will get an advantage that you don't need to wait untill our JVM got crashed by using passing " -XX:+HeapDumpOnOutOfMemoryError " parameter to JVM process. We can capture current status using jmap as below: 1.) Find out the jmap location(only if your JAVA_HOME variable not defined)       #locate jmap 2.) After finding jmap location, move to that directory and run jmap to get live thread dump.       #./jmap -dump:live,format=b,file=[file location] [pid] For more details and options run the command with help option as below : # ./jmap -help Usage:     jmap [option] <pid>         (to connect to running process)     jmap [option] ...

View Information about installed packages in Debian Based Dostro(Ubuntu/Lubuntu).

Image
Some times we come to situations where we want to get information e.g. check if package is installed or not, if installed then all information related to that one. Today, we are going to discuss the same on Lubuntu 14.04.There can be number of ways as in linux we have flexibility use number of commands and combined one to get desired results. Here, we will discuss about two most common methods i.e. 1.) Using dpkg to get list of all installed packages. 2.) View all information about installed package. 1.) Using dpkg to get list of all installed packages.                dpkg(Debian Package Management System) is a package manager for all debian based systems. It is used to install, remove and list all the information about .deb packages. Mostly, dpkg package gets installed by default during installation time.       a.) View All installed Software using dpkg -l :   ...