Monitor all the process with specific name
As a linux admin we will monitor only a specific process with specific name. Normally system admins use ps, pgrep command to find the process using particular command. In such situation to grep the process with specific name you can use the top command along with pgrep to grep only ..
POST errors and beep codes
When you turn the computer on, it performs Power On System Test (POST), during which it checks and initializes the systems internal components. If a serious error occurs, the computer does not display a message but emits a series of long and short beeps instead. Beeps are your computers way ..
Protecting username and password
Considering about the recent deadly attacks in Cyber Space thought to share few Anti Hack Tips with you so that you may safely and happily surf Internet from your home place.Here is an in-detail thread about self-protection from all the intrusions, hack attempts, rats, keylogging, stealing etc.The basic idea is ..
How to kill hundreds of deleted files
Some time your log filesystem might seem to get full, but actually some of the deleted files might be holding the disk space. in general you can kill the PID's if there is one or two deleted files. When there is more than hundreds of deleted files and you have ..
How to dowload urls from a file
How to download a list of url's freom a files?
# cat urls.txt | wget -i- -T 10 -t 3 --waitretry 1
# cat urls.txt | xargs -n1 curl -O --max-time 10 --retry 3 --retry-delay 1
# wget -i urls.txt -T 10 -t 3 --waitretry 1
--waitretry=seconds:If you don't want Wget to wait between ..
Why use /opt for installation
When we frequently install multiple software, different questions might arise in our mind like,
What is the difference between /opt and /usr/local directories?
Why some of the third party softwares are installed in /opt?
why we install packages in /usr/local?
/opt is for third-party applications that don't rely on any dependencies outside the scope ..
Jps tool to view all running java process
In linux machine you can view all the running Java processes in a local machine using jps command
# jps -v
1733 -Xms512M -Xmx1024M -Djava.endorsed.dirs=../common/endorsed -verbose abort
2892 Jps -Dapplication.home=/usr/lib/jvm/java-1.6.0-openjdk-18.104.22.168 -Xms8m
Jps is a sime utility which is used to view all the running java process in linux machine. ..
NGINX - JSP servers
Nginx is commonly used by hosting providers to execute multiple tomcat daemon on same server. Below steps will provide you an simple idea to install the scripts on server.
Login to SSH and do this
tar xf nginxadmin.tar
Its Done, Now go to ..
Steps to install other fonts in Linux
How to Install and configure Unicode TrueType fonts in Linux?
Uncompress the downloaded font archive to a directory and add it to the font path, a list of directories containing fonts:
1. Uncompress the archive
# tar xvzf utf8.tar.gz
# tar xvjf arial.tar.bz2
2. Create a directory for new fonts
# mkdir ..
How does dns works
How does the DNS works?
1) A User opens a web browser and tries to connect to www.google.com. The operating system not knowing the IP Address for www.google.com, asks the ISPs DNS Server for this information.
2) The ISPs DNS Server does not know this information, so it connects to a Root ..
Error NRPE: Command check_nrpe
The error "NRPE: Command 'check_nrpe' not defined" is received, if we have not added the required entry in "/usr/local/nagios/etc/nrpe.cfg" in the server being monitored.
Edit the file in the server which is to be monitored and add a line as below
command[check_dns]=/usr/local/nagios/libexec/check_dns -H localhost
and restart the xinetd daemon .
To restart xinetd ..
Ping command error
Nagios monitoring for ping may result in the following error
# /bin/ping -n -U -w 10 -c 5 localhost
CRITICAL - Could not interpret output from ping command
The above error is received because the ping command may not have permission to be executed by a user. You can execute the ping ..
To set JAVA_HOME for all users
In general JAVA_HOME is only set for specific users in linux servers, but sometimes there might be situations to set JAVA_HOME PATH for all the users in linux development servers. Below is the simple trick to set the JAVA_HOME PATH for all the users in linux server.
To set JAVA_HOME for ..
Commands used in nagios clients nrpe.cfg
Below are some of the handy commands which are used in nagios client configuration. Nagios clients file monitors the client and it send report to server. Below commands are few useful tips which will be very much useful when you configure the nagios. nagios is one of the best monitoring ..
Error check_dns: Could not parse arguments
Some time we might get the following error "check_dns: Could not parse arguments" in nagios monitoring server when you try to monitor a host abc, it means proper that arguments for the command is not set in "/usr/local/nagios/etc/nrpe.cfg" for the check_dns command
Command[check_dns]=/usr/local/nagios/libexec/check_dns -H localhost
You would have missed -H ..