Chinaunix首页 | 论坛 | 博客
  • 博客访问: 5600664
  • 博文数量: 745
  • 博客积分: 10075
  • 博客等级: 上将
  • 技术积分: 7716
  • 用 户 组: 普通用户
  • 注册时间: 2005-04-29 12:09
文章分类

全部博文(745)

文章存档

2019年(1)

2016年(1)

2010年(31)

2009年(88)

2008年(129)

2007年(155)

2006年(197)

2005年(143)

分类:

2005-07-03 15:55:31

第一章 describing interface configuration

第二章 describing the client-server model

第三章 customizing the solaris management console

第四章 managing swap configuration

第五章 managing crash dumps and core files

第六章 configuring NFS

第一章 describing interface configuration
ifconfig ping snoop
# ifconfig -a
ok banner
# snoop sys41 sys42
# snoop -a dhcp
snoop:summary output
snoop -V:summary verbose output
snoop -v:detailed verbose output
snoop -o filename:redirects the snoop utility output to filename in summary mode
snoop -i filename:displays packets that were previously captured in filename
用ctrl+c的方式来中断
three important files:
/etc/rcS.d/S30network.sh
/etc/hostname.xxn
/etc/inet/hosts
和主机名关联的六个文件:
/etc/nodename
/etc/hostname.xxn
/etc/inet/hosts
/etc/net/ticlts/hosts
/etc/net/ticots/hosts
/etc/net/ticotsord/hosts
can use the /usr/sbin/sys-unconfig command to undo a system's configuration
snoop命令使用的是ICMP协议
****************************************************************************

第二章 describing the client-server model
one example of the client-server relationship is the name server and resolver model of the DNS.another example of the client and server relationship is the NFS.
the inetd deamon starts at boot time using the /etc/rc2.d/S72inetsvc script
# cat /etc/inet/inetd.conf
service-name endpoint-type(终端类型) protocol wait-status uid server-program server-arguments
for example
终端类型包括:stream,dgram,raw,seqpacket,tli
# grep ftp /etc/inet/inetd.conf
ftp stream tcp6 nowait root /usr/sbin/in.ftpd   in.ftpd -a
要修改这个文件的时候:
# pkill -HUP inetd
要关闭这个服务,直接在前面将其注释掉即可
network ports can be divided into two categories,well-known ports and ephemeral(short-lived) ports.
well-known ports are stored in the /etc/inet/services file.
# grep telnet /etc/inet/services
telnet    23/tcp
# grep mail /etc/inet/services
smtp      25/tcp     mail
when you boot the solaris 9 OE.the /etc/rc2.d/s71rpc startup script initializes the rpcbind services.
# grep rpcbind /etc/services
sunrpc 111/udp rpcbind
sunrpc 111/tcp rpcbind
the rpcinfo command makes an RPC call to an RPC server.and reports what it finds.two frequently
used options to the rpcinfo command are -p and -d.
# rpcinfo -p
deleting RPC service registration,for example
# rpcinfo -d 100012 1
# pkill -HUP inetd

*****************************************************************************************

第三章 customizing the solaris management console
the solaris management console has three primary components:
the solaris management console server
the console
the solaris management console toolbox editor
to determine if the solaris management console server is running,as root perform the command:
# /etc/init.d/init.wbem status
to stop the solaris management console server,perform the command:
# /etc/init.d/init.wbem stop
to start the solaris management console server,perform the command:
# /etc/init.d/init.wbem start
to start the console from the command line,perform the command:
# smc
to start the solaris management console toolbox editor,perform the command:
# smc edit
every time you make a change to a toolbox,save the changes to that toolbox by using the solaris management console toolbox editor,and then reload that toolbox by using the solaris management console.
the absolute path name to the root toolbox is:
/var/sadm/smc/toolboxes/smc/smc.tbx
you can add a toolbox URL using the smcregister command,as follows:
# /usr/sadm/bin/smcregister toolbox add tbxURL
-B /var/sadm/smc/toolboxes/smc/smc.tbx
use the smcregister command to add a tool to a toolbox from the command-line as follows:
# /usr/sadm/bin/smcregister toolbox add tool com.sun.admin.diskmgr.client.VDiskMgr -H sys43:898

*****************************************************************************************

第四章 managing swap configuration
a system's vitual memory is a combination of the available random access memory and disk space.swap space can be defined as a temporary storage location that is used when system's
memory requirements exceed the size of available RAM.
swap space is used as a temporary storage location for data while it is swapped out of memory.
swap files can be permanently included in the swap configuration by creating an entry for the swap file in the /etc/vfstab file.
use the pagesize command to display the size of a memory page in bytes.the default page size for the solaris 9 OE is 8192 bytes.
the amount of available swap space must satisfy two criteria:
1,it must be sufficient to supplement physical RAM to meet the needs of concurrently running
processes.
2,it must be sufficient to hold a crash dump(in a single slice)
to view the current swap space allocation,complete the following steps:
1,list a summary of the system's virtual swap space.
# swap -s
2,list the details of the system's physical swap areas.
# swap -l
to add a swap slice,complete the following steps:
1,edit the /etc/vfstab file to add information describing the swap slice.
# vi /etc/vfstab
2,add the following line to create the swap slice.
/dev/dsk/c1t0d0s3 - - swap - no -
3,use the swap -a command to add additional swap area.
# swap -a /dev/dsk/c1t0d0s3
to add a swap file,complete the following steps:
1,the /export/data file system appears to have adequate space to create an additional swap file.create a 20M swap file named swapfile in the /export/data directory.
# mkfile 20m /export/data/swapfile
2,add the swap file to the system's swap space
# swap -a /export/data/swapfile
3,list the details of the modified system swap space.
# swap -l
swapfile               dev       swaplo      blocks     free
/dev/dsk/c0t0d0s1      136,1     16          1206736    1084736
/export/data/swapfile  -         16          40944      40944
4,list a summary of the modified system swap space
# swap -s
total;106256k bytes allocated + 8512k reserved = 114768k used, 587512k available
5,to use a swap file when the system is subsequently rebooted, add an entry for the swap file
in the /etc/vfstab file.
# vi /etc/vfstab
to remove a swap slice,complete the following steps:
1,delete a swap slice from the current swap configuration
# swap -d /dev/dsk/c1t0d0s3
2,edit the /etc/vfstab file,and remove the swap slice entry from the file.
removing swap files
1,delete a swap file from the current swap configuration
# swap -d /export/data/swapfile
2,remove the file to free the disk space that it is occupying
# rm /export/data/swapfile
3,edit the /etc/vfstab file ,and remove the swap file entry

************************************************************************************************

第五章 managing crash dumps and core files
when an operating system has a fatal error,it generates a crash dump file.when a process has a fatal error,it generates a core file.
you can configure the dump device by using the dumpadm command.
when an operating system crashes,the savecore command is automatically executed during a boot
the savecore command retrieves the crash dump from the dump device and then writes the crash dump to a pair of files in your file system:
/var/crash/nodename/vmcore.X
/var/crash/nodename/unix.X
to view the current dump configuration,enter the dumpadm command without arguments
# dumpadm
dump content:kernel pages
dump device:/dev/dsk/c0t0d0s1
savecore directory:/var/crash/host1
savecore enabled:yes
the current configuration is located in the /etc/dumpadm.conf file:
# cat /etc/dumpadm.conf
the syntax of the dumpadm command is :
/usr/sbin/dumpadm [-nry] [-c content-type] [-d dump-device] [-m mink| minm| min%] [-r root-dir] [-s savecore-dir]
-n:修改dump配置让它在系统启动的时候不自动执行savecore命令
-u:基于/etc/dumpadm.conf里面的内容强制性升级内核dump的配置
-y:系统启动的时候自动执行savecore命令
-c content-type:crash dump里面的内容,可以是kernel,all,curproc.curproc内容类型包括内核的内存页和当前正在执行的进程页
-d dump-device:使用dump设备的路径
-m mink
-m minm
-m min% 以三种不同形式指出剩余空间大小
-r root-dir:指定一个可供选择的根目录,如果没有-r选项,那么默认根目录是"/"
-s savecore-dir:默认的savecore-dir目录是/var/crash/hostname,hostname用uname -n命令指定
when a core file occurs,the operating system generates two possible copies of the core files,
one copy known as the global core file and the other copy known as the per-process core file.
use the coreadm command without options to display the current configuration.
# coreadm
# cat /etc/coreadm.conf
for the coreadm command ,only the superuser can use all options,except for the -p option,which a regular user can use.
pattern options for the coreadm command
%p:PID
%u:EUID
%g:EGID
%f:executable file name
%n:uname -n
%m:uname -m
%t:the time in seconds since midnight january 1,1970
%%:literal %
example1:setting the core file name pattern as a regular user
$ coreadm -p core.%f.%p $$
example2:dumping a user's core files into a subdirectory
$ coreadm -p $HOME/corefiles/%n.%f.%p $$
example3:enabling and setting the core file global name pattern
# coreadm -g /var/core/core.%f.%p -e global
example4:checking the core file configuration for specific PIDs
# coreadm 278 5678

************************************************************************************************************

第六章 configuring NFS
the NFS service enables computers of different architectures running diffenent operating systems to share file systems across a network.
the NFS was developed by sun microsystems and is recognized as a file server standard.its protocol uses the remote procedure call(RPC) method of communication between computers on the internet.
introducing the NFS server files
/etc/dfs/dfstab:lists the local resources to share at boot time
/etc/dfs/sharetab:lists the local resources currently being shared by the NFS server.
/etc/dfs/fstypes:lists the default file system types for remote file systems.
/etc/rmtab:lists file systems remotely mounted by NFS clients.
/etc/nfs/nfslog.conf:lists information defining the location of configuration logs used for NFS server logging.
/etc/default/nfslogd:lists configuration information describing the behavior of the nfslogd deamon
to start the NFS server daemons or to specify the number of concurrent NFS requests that can
be handled by the nfsd daemeon,use the /etc/rc3.d/S15nfs.server script.
the nfsd daemon:only the superuser can start the nfsd daemon. the nfsd daemon is started when
the system enters run level 3.
the /etc/rc3.d/S15nfs.server script starts the NFS server daemons when the system enters run level 3.
# /etc/init.d/nfs.server start
the NFS server daemon are shut down when:
the system enters run lovel S/0/1/2 using the /etc/rcS(0)(1)(2).d/K28nfs.server script
to stop the NFS server daemons manually,perform the command:
# /etc/init.d/nfs.server stop
# share -o ro /export/sys44_data
the share command options:ro,rw,root=client,ro=access-list,rw=access-list
access list options:
access-list=client:client

access-list=.domain
access-list=netgroup_name
anon=n:sets n to be the effective user ID of unknown users.by default,unknown users are given
the EUID 60001,if n is set to -1,access is denied.
two NFS daemons,the statd daemon and the lockd daemon,run both on the NFS servers and the NFS
clients.these daemons start automatically when a system enters run level 2.
you can detect most NFS problems from console messages or from certain symptoms that appear on a client system.some common errors are:
the rpcbind failure error
the server not responding error
the NFS client fails a reboot error
the service not responding error
the program not registered error
the stale file handle error
the unknown host error
the mount point error
the no such file error

阅读(2436) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~