Thursday, August 4, 2011

How to know java bit version(32bit or 64bit) in Linux


To know about the JVM bit version i.e. currently running on Linux Server, use following command:
#java -d64 -version
or
#java -d32 -version

If you have 32 bit JVM and you run above command i.e. java -d64 -version, then you'll get some error message on the console like ....

[root@localhost default]$  java -d64 -version
Running a 64-bit JVM is not supported on this platform.

And if you run command "java -d32 -version" , then you'll get....

[root@localhost default]$  java -d32 -version
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) Server VM (build 20.1-b02, mixed mode)

!Hope this will help you
!Enjoy
Kuldeep Sharma

Getting status of all services in Linux

Below is the script to find out status of all services on linux system.

#Created on:04-08-2011
#Last modified:04-08-2011
#Purpose:To Check the status of services
#The below for loop will take inputs from chkconfig command to check the services which are running/stopped on the machine.
for i in `chkconfig --list | awk '{print $1}' | grep -v :`
do
/sbin/service $i status
done
there is one another way of doing this task is just use single command.

#service --status-all
e.g.
===================================================================
[root@localhost ~]$  service --status-all
acpid (pid 2467) is running...
amd is stopped
anacron is stopped
arpwatch is stopped
atd (pid  2992) is running...
auditd (pid  2253) is running...
automount (pid 2660) is running...
Avahi daemon is running
Avahi DNS daemon is not running
bgpd is stopped
hcid (pid 2390) is running...
sdpd (pid 2396) is running...
capi not installed - No such file or directory (2)
clamav-milter (pid 2834) is running...
.
.
.
.
.
.
.

=================================================================


!Enjoy
Kuldeep Sharma

Integrate Jenkins with Azure Key Vault

Jenkins has been one of the most used CI/CD tools. For every tool which we are using in our daily life, it becomes really challenges when ...