Labels

hpunix (63) marathi kavita (52) linux (21) solaris11 (11) AWS (5) numerology (5)

Tuesday, August 5, 2014

Easy commands + HPUX

Easy commands:

1) Commands to restart sendmail service:

/sbin/init.d/sendmail stop;sleep 10;/sbin/init.d/sendmail start

2) Command to stop sshd:

#ps –ef |grep –i ssh

# kiil –HUP

HUP - Hang UP - it tells daemon to go and reread its configuration file as certain changes have been made which we have to incorporate now. The process doesn't actually stop, it just likes stated, rereads its config file. This is true only for daemon processes. For normal application it hangs-up the terminal.

3) Creates a new user account:

useradd [ -c comment ] [ -d dir ] [ -e expire ] [ -g group ] [ -G group1,group2 ... ] [ -m [ -k skel_dir ] ] [ -u uid ] [ -s shell ] [ -r role1,role2 ... ] login

4) 10 largest files under /var directory:

$ find /var -type f -xdev -print | xargs -e ls -lrt | sort -rn -k5 | head -n 10

5) Top 10 Ten processes consuming high Memory:

echo " SZ PID RUSER COMMAND";UNIX95= ps -ef -o 'sz pid ruser args' |sort -nr|head -10

6) To check the top 10 Ten process consuming high CPU

echo " %CPU PID RUSER COMMAND" ;UNIX95= ps -ef -o 'pcpu pid ruser args'|sort -nr|head -10

7) Restart swagent daemon by, 

# swagentd –r

8) Command to get netbackup information:

# /usr/openv/netbackup/bin/admincmd/bpgetconfig -g -L


Thanks...
Kiran Jadhav

**Let's Share our knowledge and keep visiting here**

No comments:

Post a Comment