Beruflich Dokumente
Kultur Dokumente
1 (5)
SOLARIS COMMANDS
Prepared (also subject responsible if other)
No.
Checked
Date
Rev
2007-12-14
PA1
Reference
Solaris Commands
A. # df k
a. /var should not exceed 70% to 75%. If it goes above these values, the performance of the msp
will be affected.
B. # du k * or <filename> is used to check the size in Kb.
C. If syslog deamon is hanging then
a. # ps aef | grep syslog
b. # kill HUP <pid of syslog deamon>
D. # sysdef h :gives us the system information, including hardware
E. # hostid : gives us the host ID
F. UNAME
a. # uname p :current system
b. # uname r : current solaris version
G. # uptime : get the system uptime, how long it has been running
H. # who b : gives when the system was started up
I.
Public
2 (5)
SOLARIS COMMANDS
Prepared (also subject responsible if other)
No.
Checked
Date
Rev
2007-12-14
PA1
Reference
K. Crontab:
1. To view: # crontab l
2. To edit: # crontab e
3. To edit cronjob in vi:
a. # export EDITOR=vi (only needed one time)
b. # crontab e
L. How to install SSH
1. Start with rand-600-11.tar.Z
a. # cd /opt
b. # zcat rand-600-11.tar.Z
c. # tar xvf rand-600-11.tar
d. # cd rand
e. # cd 600-11
f. # cd bin
g. # ./install.sh
2. Now with openssh-122-10.tar.Z
a. # cd /opt
b. # zcat openssh-122-10.tar.Z
c. # tar xvf openssh-122-10.tar
d. # cd openssh
e. # cd 122-10
f. # cd bin
g. # ./install.sh
M. How to compress a folder
3. # tar cvf <filename.tar> <directory name>
4. # gzip <filename.tar>
N. How to mount a FDD
5. # volcheck
6. or # mount F pcfs /dev/diskette/floppy0
O. How to enable telnet
7. Check that TERM=vt100
a. # echo $TERM (output should be vt100. if it is not, then do the following)
b. # TERM=vt100
c. # export TERM
d. # echo $TERM (check that TERM=vt100)
8. On the Sun machine
a. # cd /etc/default
b. # vi login
Public
3 (5)
SOLARIS COMMANDS
Prepared (also subject responsible if other)
No.
Checked
Date
Rev
2007-12-14
PA1
Reference
c. Edit the line CONSOLE = /dev/console by adding a # before CONSOLE then save the
file.
9. On the Sun machine
a. # cd /etc/inet
b. # vi inetd.conf
c. Comment out the Telnet to diasble telnet
P. How to change the prompt, and make aliases
10. on the \ edit the .bashrc
# vi .bashrc
export PS1=\u@\h:\w#
alias ll=ls sl
1.1.1
The following list shows the meanings of the special characters used to define the PS1 and PS2 prompt
strings.
\t - time
\d - date
\n - newline
\s - Shell name
\W - The current working directory
\w - The full path of the current working directory.
\u - The user name
\h - Hostname
\# - The command number of this command.
\! - The history number of the current command
Q. How to check the NAFO group
11. # pnmstat l
R. How to diag the system
12. # /usr/platform/sun4u/sbin/prtdiag
Public
4 (5)
SOLARIS COMMANDS
Prepared (also subject responsible if other)
No.
Checked
Date
Rev
2007-12-14
PA1
Reference
P.S. If we have a cluster, then we should add the timezone to all nodes.
4. To restart a cluster we can do it node by node or shutdown the cluster and boot it again
a. Shutdown the cluster then reboot
# scshutdown y g0 (This will bring down both nodes to the ok > prompt
Ok> boot
Public
5 (5)
SOLARIS COMMANDS
Prepared (also subject responsible if other)
No.
Checked
Date
Rev
2007-12-14
PA1
Reference
$ exit