现在的位置: 首页 > 综合 > 正文

notes – solaris – advanced administration

2013年08月28日 ⁄ 综合 ⁄ 共 6491字 ⁄ 字号 评论关闭

 

DISPLAY SYSTEM INFORMATION

 

 

hostid - print the numeric identifier of the current host

 

 

isainfo - describe instruction set architectures

isalist  - display the native instruction sets executable  on this platform

----------------------------------------------------------------------------------------

root /tmp$ isainfo -b

32

root /tmp$ isainfo -k

i386

root /tmp$ isainfo -n

i386

root /tmp$ isainfo -v

32-bit i386 applications

        sse3 sse2 sse fxsr mmx cmov sep cx8 tsc fpu

root /tmp$ isainfo -x

i386: sse3 sse2 sse fxsr mmx cmov sep cx8 tsc fpu

root /tmp$ isalist

pentium_pro+mmx pentium_pro pentium+mmx pentium i486 i386 i86

---------------------------------------------------------------------------------------

 

locale - get locale-specific information

 

prtconf - print system configuration

prtconf -D   ---  display driver

prtconf -p   ---  configuration of the booting system

prtconf -P   ---  include pseduo device

prtconf -v   ---  verbose

 

psrinfo - displays information about processors

psrinfo -p   ---  number of physical processors

psrinfo -pv ---  verbose infomation of physical processors

psrinfo -v   ---  verbose information of virtual processors (cores)

---------------------------------------------------------------------------------------

root /tmp$ psrinfo

0       on-line   since 01/31/2010 21:51:10

1       on-line   since 01/31/2010 21:51:15

root /tmp$

root /tmp$ psrinfo -p

1

root /tmp$

root /tmp$ psrinfo -pv

The physical processor has 2 virtual processors (0 1)

  x86 (chipid 0x0 GenuineIntel family 6 model 23 step 10 clock 2600 MHz)

        Pentium(r) Dual-Core  CPU      E5300  @ 2.60GHz

root /tmp$

root /tmp$ psrinfo -v

Status of virtual processor 0 as of: 01/31/2010 22:15:52

  on-line since 01/31/2010 21:51:10.

  The i386 processor operates at 2600 MHz,

        and has an i387 compatible floating point processor.

Status of virtual processor 1 as of: 01/31/2010 22:15:52

  on-line since 01/31/2010 21:51:15.

  The i386 processor operates at 2600 MHz,

        and has an i387 compatible floating point processor.

---------------------------------------------------------------------------------------

 

 

showrev - show machine, software revision, and  patch  revision information

showrev -a   ---  Print all system revision information (long)

showrev -c  [command]   --- Print the revision  information  about  commmand

                                             include library & path

 

 

SET SYSTEM INFORMATION

 

/etc/motd  --  message of the day

 

sys-unconfig - undo a system's configuration

 

change hostname:

 

/etc/nodename

/etc/hostname.* interface

/etc/inet/hosts

/etc/inet/ipnodes

cd /var/crash

mv old-host-name new-host-name

init 6

 

 

MANAGE DISK USE

 

df - displays number of free disk blocks and free files

df -a    ---  all file systems

df -b    ---  Prints the total number of kilobytes free

df -k    ---  Prints the allocation in kbytes.

df -n    ---  Prints only the FSType name

df -F FSType    ---  Specifies the FSType on which to operate.

 

du - summarize disk usage

du -h    ---  All sizes are scaled to a  human  readable

 

ls -l | sort +4rn   --- list file and arrange output by size

ls -t    ---  sort by last update

 

find /export/home/oracle -type f -atime +60 -print   

      --- find files have not bean accesed in the last 60 days

 

quot -a    ---  Generate a report for all mounted ufs file systems.

quot -af   ---  Three columns: blocks, files, user

 

 

UFS QUOTAS

 

edquota - edit user quotas for ufs file system

 

quotacheck - ufs file system quota consistency checker

...

 

 

SCHEDULING TASKS

 

using crontab & at as it in linux

 

 

SYSTEM ACCOUNTING

 

/usr/lib/acct/    ---  scripts for system accounting, you can use crontab to set up accounting

 

If you wana set up system accouting, ref. chapter 9 of <Advanced Administration>

 

 

Manage System Processes

 

ps -ef          UID   PID  PPID   C    STIME TTY         TIME CMD

ps -ecf         UID   PID  PPID  CLS PRI    STIME TTY         TIME CMD

ps -ecl         F S    UID   PID  PPID  CLS PRI     ADDR     SZ    WCHAN TTY         TIME CMD

 

                   C              xutilization for scheduling

                   CLS          scheduling class

                   F              Flags (hexadecimal and additive) associated with the process.

                   S              O(running), S(sleeping), R(runnable), T(stoped), W(waiting), Z(zombie)

                   ADDR       memory address of the process

                   SZ            size in virtual memory

                   WCHAN    The address of an event  for  which  the process  is sleeping

                   STIME       starting time

 

pgrep         grep process id

pkill             = killall ( linux )

pargs          print arguments

preap          force a defunct process to be reaped by its parent

dispadmin   process scheduler administration

priocntl        Assigns processes to a priority class and manages process priortities

                   # priocntl -e -c TS -m 60 -p 60 find . -name core -print

                   # priocntl -s -c RT -i uid 15249

psrset         creation and management of processor sets

nice             invoke a command with an altered scheduling priority

                   # nice -5 find . -name core -print

                   # nice --10 find . -name core -print

 

PROC_COMMANDS

 

pcred               Print or set the credentials (effective, real, saved UIDs and GIDs)

pfiles               Report fstat(2) and fcntl(2) information for  all  open files

pflags              Print the /proc tracing flags, the pending  and  held  signals

pldd                 List the dynamic libraries  linked  into

psig                 List the signal actions and handlers

pstack             Print a  hex+symbolic  stack  trace

pmap               Print process address maps

pwdx               Print the current working  directory

pstop              Stop pocess

prun                Set process running

pwait               Wait for all of the specified  processes to terminate.

ptime               Time  the  command, children of the command are not timed.

time                 Time  the  command, children of the command are timed.

ptree               Print process trees

 

 

 

Monitoring System Performance

 

vmstat n        overview system performnace

                      PAGE

                      re     Pages reclaimed

                      mf     Minor faults and major faults

                      pi      Kbytes paged in

                      po     Kbytes paged out

                      fr       Kbytes freed

                      de     Anticipated memory that is needed by recently swapped-in processes

                      sr      Pages scanned by the page daemon not currently in use.

                      FAULT

                      in      Interrupts per second

                      sy     System calls per second

                      cs     CPU context switch rate

vmstat -s       system event informantion

vmstat -i        Displaying Interrupts Per Device

 

iostat n          overview  io performance

                      TTY

                      tin       Number of characters in the terminal input queue

                      tout    Number of characters in the terminal output queue

                      DISK

                      bps     Blocks per second

                      tps      Transactions per second

                      serv    Average service time, in milliseconds

iostat -x         device

iostat -c          cpu

iostat -t          tty

 

sar -a

 

抱歉!评论已关闭.