xntpd自动关闭问题求助

2024-05-16

1. xntpd自动关闭问题求助

rpm -Uvh ******.rpmwllgnxl99(站内联系TA)您说的是hp-unix系统吗?bay__gulf(站内联系TA)说的红帽系列,如红帽,红旗,suse等。hpunix没有用过。 make 是gcc 包中的一个软件,安装了gcc 就有make了madonion(站内联系TA)hp ux就玩过一会别人的,安装软件应该用swintall命令吧,你上网搜搜hpux下的gcc下载下来解压应该是depot文件把,然后swinstall。我也没有ho9000的机器,就是赖着别人的玩玩。另外,hpux自己带的编译器好像叫acc吧。反正hpux我也不太会,期待高手。 ?咛遄肮?裁淳筒皇呛芮宄?耍?抑挥杏懈龅腿ㄏ薜挠没?adonion(站内联系TA)安藤的话自己下载个ia64的linux装上就结了么wllgnxl99(站内联系TA)这个问题我已经解决了,但是又遇上新问题了就是不知道小型机的hp-unix系统应该用什么数学库,问hp公司他们也不太明白! ntpq 命令开启NTP查询程序,你man一下ntpq就知道了其作用,  ntpq -p,-p参数显示所有已知的连接到NTP服务器的客户机信息列表以及他们的状态汇总,你这个结果显然是目前没有连接到NTP服务器的客户端。  自己多看看文档有帮助的

xntpd自动关闭问题求助

2. 请教unix服务器上ntpd服务的一个参数问题

ntpd -x  -- 这里的这个-x代表加一个参数,x 可以是c, f, k, p, P, r, s, t, U等等中的一个字母。
详细说明,可以看一下ntpd的man page. 如:
-bash-3.00$ man ntpd
Reformatting page.  Please Wait... done

System Administration Commands                           ntpd(1M)

NAME
     ntpd - Network Time Protocol daemon Version 4

SYNOPSIS
     /usr/lib/inet/ntpd [-46aAbdDgLmnNqvx] [-c conffile]
         [-f driftfile] [-k keyfile] [-l logfile] [-p pidfile]
         [-P priority] [-r broadcastdelay] [-s statsdir]
         [-t trustedkey] [-U interface_update_time]

DESCRIPTION
     The ntpd program is an operating  system  daemon  that  syn-
     chronises  the  system clock with remote NTP time servers or
     local reference clocks. It is a complete  implementation  of
     the  Network Time Protocol (NTP) version 4, but also retains
     compatibility with version 3, as defined by  RFC  1305,  and
     versions  1  and  2,  as  defined  by RFC 1059 and RFC 1119,
     respectively.
。。。

man page中还有对各参数的详细介绍。 
OPTIONS
     -4, --ipv4
          Force DNS resolution of following  host  names  on  the
          command line to the IPv4 namespace. Cannot be used with
          the --ipv6 option.

     -6, --ipv6
          Force DNS resolution of following  host  names  on  the
          command line to the IPv6 namespace. Cannot be used with
          the --ipv6 option.

     -a, --authreq
          Require  cryptographic  authentication  for   broadcast
          client, multicast client and symmetric passive associa-
          tions.  This is the  default.   This  option  must  not
          appear with authnoreq option.

     -A, --authnoreq
          Do not require cryptographic authentication for  broad-
          cast  client,  multicast  client  and symmetric passive
          associations.  This is almost never a good  idea.  This
          option must not appear with the authreq option.

     -b, --bcastsync
          Enable the client to sync to broadcast servers.

SunOS 5.10                Last change:                          5

System Administration Commands                           ntpd(1M)

     -c string, --configfile=string
          The  name  and  path   of   the   configuration   file,
          /etc/inet/ntp.conf by default.

     -d, --debug-level
          Increase output debug message level.  This  option  may
          appear an unlimited number of times.

     -D string, --set-debug-level=string
          Set the output debugging level.  Can be supplied multi-
          ple times, but each overrides the previous value(s).

     -f string, --driftfile=string
          The   name   and   path   of   the   frequency    file,
          /var/ntp/ntp.drift by default.

     -g, --panicgate
          Allow the first adjustment to exceed the panic limit.

          Normally, ntpd exits with a message to the  system  log
          if  the  offset  exceeds  the panic threshold, which is
          1000s by default. This option allows the time to be set
          to  any  value  without  restriction; however, this can
          happen only once. If the threshold  is  exceeded  after
          that,  ntpd will exit with a message to the system log.
          This option can be used with the  -q  and  -x  options.
          See  the  tinker configuration file directive for other
          options.

     -k string, --keyfile=string
          Specify the name and path of the  symmetric  key  file.
          /etc/inet/ntp.keys is the default.

     -l string, --logfile=string
          Specify the name and path of the log file.  The default
          is the system log file.

     -L, --novirtualips
          Do not listen to virtual IPs. The default is to listen.

     -n, --nofork
          Do not fork.

     -N, --nice
          To the extent permitted by the  operating  system,  run
          ntpd at the highest priority.

     -p string, --pidfile=string
          Specify the name and path of the file  used  to  record
          ntpd's process ID.

SunOS 5.10                Last change:                          6

System Administration Commands                           ntpd(1M)

     -P number, --priority=number
          To the extent permitted by the  operating  system,  run
          ntpd  at  the  specified sched_setscheduler(SCHED_FIFO)
          priority.

     -q, --quit
          Set the time and quit.  ntpd will exit just  after  the
          first  time the clock is set. This behavior mimics that
          of the ntpdate program, which is to be retired.  The -g
          and -x options can be used with this option.  Note: The
          kernel time discipline is disabled with this option.

     -r string, --propagationdelay=string
          Specify  the  default  propagation   delay   from   the
          broadcast/multicast  server  to  this  client.  This is
          necessary only if the delay cannot be computed automat-
          ically by the protocol.

     -s string, --statsdir=string
          Specify the directory path for  files  created  by  the
          statistics  facility. This is the same operation as the
          statsdir statsdir command.

     -t number, --trustedkey=number
          Add a key number to the trusted key list.  This  option
          can occur more than once. This is the same operation as
          the trustedkey key command.

     -U number, --updateinterval=number
          interval in seconds between scans for  new  or  dropped
          interfaces.  This option takes an integer number as its
          argument.

          Give the time in seconds between two scans for  new  or
          dropped  interfaces.   For  systems with routing socket
          support the scans will be performed shortly  after  the
          interface  change has been detected by the system.  Use
          0 to disable scanning. 60 seconds is the  minimum  time
          between scans.

     --var=nvar
          make ARG an ntp variable (RW).  This option may  appear
          an unlimited number of times.

     --dvar=ndvar
          make ARG an ntp variable  (RW|DEF).   This  option  may
          appear an unlimited number of times.

     -x, --slew
          Slew up to 600 seconds.

SunOS 5.10                Last change:                          7

System Administration Commands                           ntpd(1M)

          Normally, the time is slewed if the offset is less than
          the  step  threshold,  which  is 128 ms by default, and
          stepped if above the threshold.  This option  sets  the
          threshold  to  600 s, which is well within the accuracy
          window to set the clock manually.  Note: Since the slew
          rate  of  typical  Unix kernels is limited to 0.5 ms/s,
          each second  of  adjustment  requires  an  amortization
          interval of 2000 s.  Thus, an adjustment as much as 600
          s will take almost 14 days to  complete.   This  option
          can be used with the -g and -q options.  See the tinker
          configuration file directive for other options.   Note:
          The  kernel  time  discipline  is  disabled  with  this
          option.

     -?, --help
          Display usage information and exit.

     -!, --more-help
          Extended usage information passed thru pager.

      --version
          Output version of program and exit.

3. 搭建NTP服务器 客户机同步的是总报这个是什么意思??23 May 22:33:08 ntpdate[6006]: the NTP socket is

您收到此错误消息的原因是由于 xntpd 已经绑定到了该 Socket。运行 ntpdate 时,它会首先进行广播,然后侦听端口 123。如果 xntpd 正在运行,而有一个进程已经在侦听该端口了,则会使 ntpdate 无法在上面运行。运行下列命令,即可找出 xntpd 的 PID
ps -ef|grep xntpd
清除 (Kill) 该进程,然后尝试再次与 ntp 服务器进行同步。此时您不应该收到此错误消息。
请注意,如果您尝试与之同步的服务器没有运行 xntpd,则会收到下列错误消息:
ntpdate[12573]: no server suitable for synchronization found
出现这种情况的原因是,如果您想使用另一个服务器的时间,该服务器必须已经进行了自身同步。

搭建NTP服务器 客户机同步的是总报这个是什么意思??23 May 22:33:08 ntpdate[6006]: the NTP socket is

4. 哪个版本的Linux占硬盘空间最小?

还没有具体看过,呵呵.不过给你贴份我的收藏.
主流服务器UNIX操作系统用户帐号的设置
账号设置 HP-UX  FreeBSD  Solaris (SPARC)
密码文件 /etc/passwd
/tcb/files/auth/r/root /etc/passwd
/etc/master.passwd /etc/passwd 
/etc/shadow
组文件 /etc/group
/etc/logingroup /etc/group /etc/group
允许最大用户ID 2147483647 65535 2147483647
允许远程登录的用户文件设置 /etc/securetty
{console} /etc/ttys 
{secure} /etc/default/login
{CONSOLE=/dev/console}
Nobody的UID -2 65534 60001 & 65534(nobody4)
Nobody的GID -2(nogroup) 65534 60002 & 65534(nogroup)
找回ROOT密码 >boot
Interact with IPL ? Y
ISL>hpux -iS
passwd root ok boot -s
passwd root boot cdrom -s
mkdir /tmp/a
mount /dev/c0t0d0s0 /tmp/a
vi /tmp/a/etc/shadow
创建新用户 useradd adduser Useradd
删除用户 userdel rmuser Userdel
列出用户 logins   Logins
修改用户账号 usermod   Usermod

账号设置 AIX  Linux( RedHat ) 
密码文件 /etc/passwd
/etc/security/passwd /etc/passwd
/etc/shadow
组文件 /etc/group
/etc/security/group /etc/group
允许最大用户ID 4294967295 65535
允许远程登录的用户文件设置 /etc/security/user
{rlogin=true} /etc/securetty
{ttyp1}
Nobody的UID 4294967294 99
Nobody的GID 4294967294 99
找回ROOT密码 Boot from CD/Tape
Installation/Maintenance
Start Limited Shell
getrootfs hdisk0
vi /etc/security/passwd {lilo}
control-x
linux S
passwd root

{grub}
c
kernel vmlinuz-2.4.9-13 single ro root=/dev/hda8
initrd /initrd-2.4.9-13.img
boot
passwd root
创建新用户 mkuser Useradd
删除用户 rmuser Userdel
列出用户 lsuser -f ALL  
修改用户账号 chuser -a usermod

主流服务器UNIX操作系统目录结构对比
Directory Mappings   AIX  FreeBSD  HP-UX 
Root filesystem /     {/dev/hd4} /   {/dev/ad0s1a} /     {/dev/vg00/lvol1}
Home Directory /home {/dev/hd1}   /home {/dev/vg00/lvol4}
  /tmp  {/dev/hd3}   /tmp  {/dev/vg00/lvol6}
  /usr  {/dev/hd2} /usr {/dev/ad0s1f} /usr  {/dev/vg00/lvol7}
  /var  {/dev/hd9var} /var {/dev/ad0s1e} /var  {/dev/vg00/lvol8}
Sample configuration files -   /usr/newconfig

Directory Mappings   Linux( RedHat )  Solaris Tru64 
Root filesystem /     {/dev/sda1} /         {/dev/vx/dsk/rootvol} /    {/dev/rz0a}
Home Directory   /export/home  {dev/vx/dsk/home}  
    /tmp     {dev/vx/dsk/swapvol}  
    /usr   /usr {/dev/rz0g}
    /var    
Sample configuration files      

主流服务器UNIX操作系统常用命令
General Commands  AIX  FreeBSD  HP-UX  Linux(RedHat)  Solaris  Tru64 
Unique host ID Hostid   uname -i hostid hostid hostid
Administrator Smit   Sam linuxconf admintool  netconfig
Performance monitor Topas(有过top)
monitor top Top
glance Top top top
System activity reporter Sar sa Sar   sar  
Virtual Memory statistics Vmstat vmstat vmstat vmstat vmstat vmstat
I/O statistics Iostat iostat iostat   iostat iostat
Error logs alog -o -t boot
errpt dmesg dmesg Dmesg  dmesg uerf -R -o full
Physical RAM 1M TB    4TB 64GB{>2.3.24} 16TB 4TB
Shared Memory 64K TB    8TB sysctl kernel.shmmax    
Process Data Space 384K TB    4TB 900 MB     
Swap device /dev/hd6 /dev/ad0s1b /dev/vg00/lvol2 /dev/sda2 /dev/vx/dsk/swapvol /dev/rz0b
Swap file type /etc/swapspaces swap swap partition type 82  swap raw
Display swap size lsps –a swapinfo swapinfo -a Free swap -l swapon -s
Activate Swap swapon -a swapon -a swapon -a swapon -a swap -a swapon -a


主流服务器UNIX操作系统打印机、TCP/IP设置
Printers  AIX  FreeBSD  HP-UX 
Printer Queues /etc/qconfig /var/spool/print /etc/lp/interface/*
Stop LP  stopsrc -s lpd   lpshut
Start LP startsrc -s lpd Lpd lpsched
Submit print jobs enq
lp
lpr
qprt Lp lp
LP statistics enq -A
lpq
lpstat
qchk Lpq lpstat
Remove print jobs cancel
lprm
qcan
enq –x Cancel
lprm cancel
Add printer queue smit mkpq   lpadmin -p pq
Remove Printer Q smit rmpq   lpadmin -x pq
Make default Prt export LPDEST="pq"   lpadmin -d pq
TCP/IP  AIX  FreeBSD  HP-UX 
Network IP configuration lsattr -E -l inet0 /etc/rc.conf /etc/rc.config.d/netconf
Hosts IP addresses /etc/hosts /etc/hosts /etc/hosts
Name service switch /etc/netsvc.conf /etc/host.conf /etc/nsswitch.conf
Network parameters no –a Sysctl ndd -h
Routing daemon Gated Routed gated
NIC Configurations ifconfig –a ifconfig -a lanscan -v
Secondary IP Addr ifconfig en0 alias IP  ifconfig xl0 alias IP ifconfig lan0:1 IP 
(solaris also)
Login prompt HERALD @
/etc/security/login.cfg   telnetd –b /etc/issue
Increase the # of pseudo-terminals odmget -q "attribute=num and uniquetype=pty/pty/pty" PdAt | sed "s/0-64/0-512/" |
odmchange -q "attribute=num and uniquetype=pty/pty/pty" -o PdAt 
chdev -l pty0 -anum=256 -P
reboot   rebuild your kernel with these new values NPTY=# 
NSTRPY=# 
reboot 
insf -d ptys -n #
insf -d ptym -n #
insf -d pts -s # -e -v
 
Maximum # of ptys 512   {MAXUSERS}
Remote Shell Remsh
rsh Rsh remsh
YP/NIS service binder /usr/lib/netsvc/yp/ypbind /usr/sbin/ypbind /usr/lib/netsvc/yp/ypbind 

主流服务器UNIX操作系统打印机、TCP/IP设置 续
Printers  Linux (Redhat) Solaris (SPARC) Tru64 
Printer Queues /var/spool/lpd/lp/* /etc/lp/interfaces/* /usr/spool/lpd
Stop LP  /etc/init.d/lpd stop /usr/lib/lp/lpshut /sbin/init.d/lpd stop
Start LP /etc/init.d/lpd start /usr/lib/lp/lpsched /sbin/init.d/lpd start
Submit print jobs Lpr Lp
lpr Lp
lpr
LP statistics Lpq Lpstat Lpstat
Remove print jobs Lprm Cancel
lprm cancel
lprm
Add printer queue Printtool lpadmin -p pq Lprsetup
Remove Printer Q   lpadmin -x pq Lprsetup
Make default Prt   lpadmin -d pq export PRINTER="lp"
TCP/IP  Linux( RedHat )  Solaris (SPARC) Tru64 
Network IP configuration /etc/sysconfig/network-scripts/  /etc/hostname.*
/etc/inet/*
/etc/defaultrouter /etc/rc.config
Hosts IP addresses /etc/hosts /etc/inet/hosts /etc/hosts
Name service switch /etc/nsswitch.conf /etc/nsswitch.conf /etc/svc.conf
Network parameters sysctl -a | grep net Ndd /dev/[tcp|ip] ?  
Routing daemon routed in.routed routed
NIC Configurations ifconfig -a ifconfig –a ifconfig -a
Secondary IP Addr modprobe ip_alias
ifconfig eth0:1 IP ifconfig hme0:1 IP up ifconfig ln0 alias
Login prompt /etc/issue BANNER @
/etc/default/telnetd /etc/issue
Increase the # of pseudo-terminals cd /dev
./MAKEDEV -v pty {/etc/system}
set pt_cnt = #  {SYSV}
set npty = #   {BSD}
{/etc/iu.ap}
ptsl 0 # ldterm ttcompat
halt
boot –r cd /dev
./MAKEDEV PTY_1
Maximum # of ptys 256 176       {BSD}
3000      {SYSV} 8192
Remote Shell rsh Rsh rsh
YP/NIS service binder /sbin/ypbind /usr/lib/netsvc/yp/ypbind /usr/sbin/ypbin







主流服务器UNIX操作系统系统文件
System Files  AIX  FreeBSD  HP-UX 
NFS exported /etc/exports /etc/exports /etc/exports
NFS Client mounted directories /etc/xtab   /etc/xtab
Max File System 128 GB   128 GB
Max File Size 64 GB   128 GB
Max # File Descriptors 64 K   60~ K

System Files  Linux (RedHat)  Solaris  Tru64 
NFS exported /etc/exports /etc/dfs/dfstab
/etc/dfs/sharetab /etc/exports
NFS Client mounted directories /var/lib/nfs/xtab /etc/rmtab /var/adm/mountdtab
Max File System 2 TB  1 TB
8000 TB {vxfs} 128 GB {<= 3.2G}
512 GB {>= 4.0}
16 TB {advfs}
Max File Size 2 GB    {512B block size}
8192 GB {8KB block size} 1 TB
2 GB {=<2.5.1} 128 GB {<= 3.2G}
512 GB {>= 4.0}
16 TB {advfs}
Max # File Descriptors sysctl fs.file-max 64 K 64 K

主流服务器UNIX操作系统磁盘与逻辑卷命令
DISK/LVM Commands  AIX  FreeBSD  HP-UX 
Filesystem table /etc/filesystems /etc/fstab /etc/fstab
Free disk blocks df -k df -k Bdf
Device listing lsdev -C   /sbin/ioscan
Disk information bootinfo -s hdisk#  fdisk -v ad0 diskinfo /dev/rdsk/c#t#d#
Disk Label lspv -l hdisk# disklabel ad0 pvdisplay -v /dev/dsk/C#t#d#
LVM Concepts Partition  sub disk logical extents
  Volume Volume logical volume
    Plex  
  Volume group   volume group
Journal Filesystem type jfs   Vxfs
Default volume group /dev/rootvg   /dev/vg00
Display volume group lsvg -l rootvg   vgdisplay -v vg00
Modify physical volume chpv   Pvchange
Prepare physical disk mkdev -c disk -l hdisk#   pvcreate
List physical volume lspv vinum ld pvdisplay
Remove disk from volume group reducevg   vgreduce
Move logical volumes to another physical volumes migratepv vinum move -f drive object pvmove
Create volume group mkvg   vgcreate
Remove volume group     vgremove
Volume group availability chvg
varyonvg
varyoffvg   vgchange
Restore volume group     vgcfgrestore
Exports volume group exportvg   vgexport
Imports volume group importvg   vgimport
Volume group listing lsvg   Vgscan   是一样的么?
Change logical volume characteristics  chlv   lvchange
List logical volume lslv vinum lv lvdisplay
Make logical volume mklv   lvcreate
Extend logical volume extendlv   lvextend
Reduce logical volume AIX reduce LV   Lvreduce 如何用?
Remove logical volume rmlv vinum rm vol lvremove
Prepare boot volumes bootlist -m normal   lvlnboot
Remove boot volumes     lvrmboot
Extend File system chfs -a size=# /mt   extendfs /dev/vg00/lvol8
fsadm -F vxfs -b {LE * 1024} /mt
Reduce/Split mirrors rmlvcopy   lvsplit
Merge mirrors     lvmerge
Create mirrors mklv -c 2 vinum mirror drive lvcreate -m 1
Add mirrors mklvcopy lv 2    lvextend -m 1
Create striped volumes mklv -u 3 -S 64K vinum stripe drive lvcreate -i 3 -I 64
System recovery tape mksysb -i /dev/rmt0   /opt/ignite/bin/make_recovery
Backup savevg -i rootvg vinum saveconfig fbackup
Restore restvg    frecover

主流服务器UNIX操作系统磁盘与逻辑卷命令 续
DISK/LVM Commands  Linux (RedHat)  Solaris (SPARC)  Tru64 
Filesystem table /etc/fstab /etc/vfstab /etc/fstab
Free disk blocks df -k df –k df -k
Device listing cat /proc/devices Sysdef  
Disk information cat /proc/scsi/scsi0/sda/model format -d c#t#d#
format>current
format>inquiry file /dev/rrz0c
Disk Label fdisk -l Prtvtoc disklabel -p rz0
LVM Concepts logical extents sub disk sub disk
  logical volume Volume Volume
    Plex Plex
  volume group disk group disk group
Journal Filesystem type ext2  居然是jfs的? Vxfs Advfs  居然是jfs的?
Default volume group   /dev/vx/dsk/rootdg 
居然有 vg? /dev/vol/rootdg
居然有 vg?
Display volume group vgdisplay -v vxprint -l -g rootdg volprint -l -g rootdg
Modify physical volume pvchange    
Prepare physical disk pvcreate vxdiskadd voldiskadd
List physical volume pvdisplay vxprint -dl volprint -dl
Remove disk from volume group vgreduce vxdg rmdisk voldg rmdisk
Move logical volumes to another physical volumes pvmove vxassist move volassist move
Create volume group vgcreate vxdg init voldg init
Remove volume group vgremove    
Volume group availability vgchange    
Restore volume group vgcfgrestore    
Exports volume group vgexport vxdg deport voldg deport
Imports volume group vgimport vxdg import voldg import
Volume group listing vgscan    
Change logical volume characteristics  lvchange  vxedit set voledit set
List logical volume lvdisplay vxprint -vl volprint -vl
Make logical volume lvcreate vxassist make volassist make
Extend logical volume lvextend vxassist growto volassist growto
Reduce logical volume lvreduce vxassist shrinkto volassist shrinkto
Remove logical volume lvremove vxedit rm voledit -g rootdg -rf rm vol1
Prepare boot volumes lilo vxbootsetup  
Remove boot volumes      
Extend File system resize2fs vxva
mkfs -M  
Reduce/Split mirrors lvsplit    
Merge mirrors lvmerge    
Create mirrors   vxassist mirror volassist make vol 100mb mirror=true
Add mirrors      
Create striped volumes lvcreate -i 3 -I 64 vxassist make vol 100mb layout=raid5 volassist make vol 100mb layout=stripe
System recovery tape     /usr/sys/bin/btcreate
Backup tar cvf /dev/rst0 / ufsdump vdump
Restore tar xvf /dev/rst0 
这一列对不对? ufsrestore vrestore











主流服务器UNIX操作系统安装与卸载
Software  AIX  FreeBSD HP-UX 
Install Software installp -a pkg_add swinstall
Uninstall software installp -u pkg_delete swremove
List installed software lslpp -L all pkg_info -a swlist
Verify installed software lppchk -v   swlist -l fileset -a state
List all files lslpp -f fileset pkg_info -L package swlist -l file fileset
List installed patches instfix -i   swlist -l patch
what /stand/vmunix
Package owner lslpp -w path   swlist -l file | grep path
SW Directory /usr/lpp /var/db/pkg /var/adm/sw/

Software  Linux (RedHat)  Solaris (SPARC)  Tru64 
Install Software rpm -i package pkgadd setld -l
Uninstall software rpm -e package pkgrm setld -d
List installed software rpm -qa pkginfo setld -i
Verify installed software rpm -V package pkginfo -i
pkginfo -p setld -v
List all files rpm -ql package pkgchk -l package setld -i package
List installed patches   patchadd -p dupatch -track -type patch
Package owner rpm -qf file pkgchk -l -p path  
SW Directory /var/lib/rpm /var/sadm /var/adm/smlogs


主流服务器UNIX操作系统技术支持信息
Links  AIX  HP-UX  Linux (RedHat) 
FAQ AIX-FAQ
HP-UX FAQ  这个和我知道的一个? LINUX FAQ

Online Manual AIX 4.3 Books
HP-UX 11.00 Collection
Linux Documentation Project

Technical Support RS/6000 TechSupport
IT Resource Center
Red Hat support

Phone Number 1-800-CALL-AIX 1-800-633-3600 1-888-REDHAT1
Free Software Bull
HP-UX Ports
Linux Software Map

Certification www.ibm.com
education.hp.com
RHCE


Links  FreeBSD  Solaris (SPARC)  Tru64 
FAQ FreeBSD FAQ
Solaris 2 FAQ
Tru64 FAQ

Online Manual FreeBSD Hand Book
Solaris 7 Documentation
Tru64 Documents

Technical Support   SunSolve
Alpha Systems Support

Phone Number   1-800-USA-4SUN  
Free Software FreeBSD Primary Site
Sun Freeware
Tru64 Demos, Shareware & Freeware

Certification   suned.sun.com
ASE Information


主流服务器UNIX操作系统其它命令
MISC  AIX  FreeBSD  HP-UX 
Startup script /etc/rc /etc/rc /sbin/rc
Kernel /usr/lib/boot/unix_up /kernel /stand/vmunix
Kernel Parameters lsattr -E -l sys0 sysctl -a sysdef   kmtune  kmsystem
Reconfigure the kernel 
chdev -l sys0 -a  cd /sys/i386/conf
vi KERNEL
config KERNEL
cd ../../compile\
/KERNEL
make depend
make
make install cd /stand/build\
/usr/lbin/sysadm\
/system_prep -v -s system
vi system
mk_kernel -s system
cd /stand
mv system system.prev
mv vmunix vmunix.prev
mv dlkm dlkm.prev
mv /stand/build\
/system system
kmupdate /stand/build\
/vmunix_test
List modules genkex kldstat kmadmin –s
Load module   kldload kmadmin –L
Unload module   kldunload kmadmin –U
Initialize system install_assist /stand/sysinstall set_parms initial
Physical RAM bootinfo -r sysctl hw.physmem grep -i Physical\ /var/adm/syslog\
/syslog.log
Kernel Bits bootinfo -k   getconf KERNEL_BITS
Crash utility Crash crash Adb
Trace System Calls Syscalls truss tusc

Machine model uname -m
bootinfo -m uname -m model
uname -m
OS Level Oslevel uname -r uname -r
Run Level who –r   who -r
Core dump files /var/adm/ras   /var/adm/crash
Boot single user Key on service mode/F4
Boot from CD/Tape
Select Maintenance
Limited function Shell ok boot –s >boot
Interact with IPL ? Y
ISL>hpux -iS
Maintenance mode   ok boot –as >boot
Interact with IPL ? Y
ISL>hpux -lm
Interrupt Key     control-B
Return to console     Co
Timezone Management /etc/environment
/etc/profile /etc/localtime /etc/TIMEZONE
NTP Daemon
如何用它? /etc/ntp.conf
startsrc -s xntpd /etc/rc.conf {xntpd enable="YES"}
/etc/rc.network /etc/rc.config.d\
/netdaemons
/sbin/init.d/xntpd
主流服务器UNIX操作系统其它命令 续
MISC  Linux (RedHat)  Solaris (SPARC)  Tru64 
Startup script /etc/rc.d/rc /sbin/init.d /sbin/init.d
Kernel /boot/vmlinuz /kernel/genunix /vmunix
Kernel Parameters sysctl -a sysdef –I sysconfig   dxkerneltuner
Reconfigure the kernel cd /usr/src/linux 
make mrproper 
make menuconfig 
make dep;clean;bzImage;install 
make modules
make modules_install 
cp arch/i386/boot/bzImage /boot/vmlinuz
mkinitrd /boot/initrd-2.4.img 2.4
vi /etc/lilo.conf
lilo vi /etc/system
reboot doconfig
List modules lsmod modinfo  
Load module insmod modload  
Unload module rmmod modunload  
Initialize system netconf sys-unconfig netsetup
Physical RAM free prtconf uerf | grep memory
Kernel Bits getconf WORD_BIT isainfo -kv 64
Crash utility lcrash
crash kdbx
Trace System Calls strace truss trace

Machine model uname -m uname -imp uname -p
OS Level uname -r uname -r sizer -v
Run Level runlevel who -r who -r
Core dump files   /var/crash/`uname -n`  
Boot single user {lilo}
control-x
linux S

{grub}
c
kernel vmlinuz-2.4.9-13 single   ro root=/dev/hda8
initrd /initrd-2.4.9-13.img
boot ok boot -s >>> boot -fl s
Maintenance mode   ok boot -as  
Interrupt Key   Stop-A control-P
Return to console   ok go  
Timezone Management /etc/sysconfig/clock /etc/TIMEZONE
/etc/default/init /etc/svid3_tz
timezone
NTP Daemon /etc/ntp.conf
/etc/rc.d/init.d/xntpd /etc/inet/ntp.conf
/etc/init.d/xntpd rcmgr set XNTPD_CONF YES
/sbin/init.d/xntpd

主流服务器UNIX操作系统设备管理
Devices  AIX  FreeBSD  HP-UX 
Devices /dev /dev /dev
Install devices for attached peripherals cfgmgr –v /dev/MAKEDEV insf -e
Remove device rmdev –l   rmsf
Device drivers Lscfg   lsdev
CPU lsdev -Cc processor sysctl hw.model ioscan -fnC processor
List Terminal lsdev -Cc tty   ioscan -fnC tty
Diagnostics Diag pciconf -l Stm
Whole Disk /dev/hdisk# /dev/ad0s1c /dev/dsk/c#t#d0
CDROM /dev/cd0 /dev/acd0c /dev/dsk/c#t2d0
CDROM file type Cdrfs cd9660 Cdfs
Rewinding tape drive /dev/rmt0 /dev/rwt0d /dev/rmt/0m
Floppy drive /dev/rfd0 /dev/fd0 -
Non-rewinding tape drive /dev/rmt0.1 /dev/nrwt0d /dev/rmt/0mn

Devices  Linux (RedHat)  Solaris (SPARC)  Tru64 
Devices /dev /devices /dev
Install devices for attached peripherals /dev/MAKEDEV drvconfig
devlinks
disks
tapes
ports scu scan edt
scsimgr -scan_all
Remove device   rem_drv  
Device drivers   prtconf -D  
CPU cat /proc/cpuinfo psrinfo -v psrinfo -v
List Terminal   pmadm -l  
Diagnostics   /usr/platform/`uname -m`/
sbin/prtdiag
ok test-all
/opt/SUNWvts/bin/sunvts  
Whole Disk /dev/sda /dev/c#t#d0s2 /dev/rz0c
CDROM /dev/cdrom /dev/dsk/c#t6d0s2 /dev/rz3c
CDROM file type iso9660 hsfs cdfs
Rewinding tape drive /dev/rst0  {c 9 0} /dev/rmt/0 /dev/rmt0
Floppy drive /dev/fd0 /dev/diskette /dev/fd0c
Non-rewinding tape drive /dev/nrst0 {c 9 128} /dev/rmt/0n /dev/nrmt0

5. AIX ORACLE INS 10102

以下在AIX 6.1+Veritas CFS环境上安装11gR2 RAC :
1.  11gR2 GI/RAC安装预备工作
1.1       安装环境:
硬件环境为2节点IBM p系列小型机,每个节点物理CPU数目32个,内存509440 MB,交换空间32768MB操作系统版本为64bit AIX 6.1(6100-06-09-1228)。
 
 
Setting    Value    
Machine and version    AIX macleandb-007 1 6 00F71C964C00    
Fully qualified host name    macleandb-007    
Platform    64-bit AIX    
O/S Version    6.1.0.0    
O/S Maintenance Level    6100-06    
O/S Service Pack Level    6100-06-09-1228    
Logged in as    oracle    
Last run as    uid=1101(oracle) gid=1000(oinstall) groups=1000(oinstall),1200(dba),1300(asmdba)    
Executed as Oracle home owner?    Yes    
RDA home directory    /oracle/rda    
RDA work directory    /oracle/rda    
Output file prefix    RDA    
Output file directory    /oracle/rda/output    
Setup profile    DB11g    
Perform network pings?    No    
 
Item    Value    
Processor(s)    32 Processor(s) Installed
[01]: PowerPC_POWER7 3864 MHz
[02]: PowerPC_POWER7 3864 MHz
[03]: PowerPC_POWER7 3864 MHz
[04]: PowerPC_POWER7 3864 MHz
[05]: PowerPC_POWER7 3864 MHz
[06]: PowerPC_POWER7 3864 MHz
[07]: PowerPC_POWER7 3864 MHz
[08]: PowerPC_POWER7 3864 MHz
[09]: PowerPC_POWER7 3864 MHz
[10]: PowerPC_POWER7 3864 MHz
[11]: PowerPC_POWER7 3864 MHz
[12]: PowerPC_POWER7 3864 MHz
[13]: PowerPC_POWER7 3864 MHz
[14]: PowerPC_POWER7 3864 MHz
[15]: PowerPC_POWER7 3864 MHz
[16]: PowerPC_POWER7 3864 MHz
[17]: PowerPC_POWER7 3864 MHz
[18]: PowerPC_POWER7 3864 MHz
[19]: PowerPC_POWER7 3864 MHz
[20]: PowerPC_POWER7 3864 MHz
[21]: PowerPC_POWER7 3864 MHz
[22]: PowerPC_POWER7 3864 MHz
[23]: PowerPC_POWER7 3864 MHz
[24]: PowerPC_POWER7 3864 MHz
[25]: PowerPC_POWER7 3864 MHz
[26]: PowerPC_POWER7 3864 MHz
[27]: PowerPC_POWER7 3864 MHz
[28]: PowerPC_POWER7 3864 MHz
[29]: PowerPC_POWER7 3864 MHz
[30]: PowerPC_POWER7 3864 MHz
[31]: PowerPC_POWER7 3864 MHz
[32]: PowerPC_POWER7 3864 MHz    
Total Physical Memory    509440 MB    
Swap: Max Size    32768 MiB    
Swap: Percent Used    1%    
 
 
1.1       网络环境:
 
对于每台机器,需要配置:
1 个机器固有IP 地址(Public IP)和对应的机器名,在DNS 中注册,或者写到
/etc/hosts 文件中。
1 个虚拟IP 地址(Virtual IP)和对应的服务名,在DNS 中注册,或者写到
/etc/hosts 文件中。(与Public IP 不同,但必须处于同一网段)
1 个互联IP 地址(Private IP)和对应的私有名,写到/etc/hosts 文件中。(这类IP
地址建议采用如: 172.168.*.* 或192.168.*.*网段的地址)
3 个SCAN IP地址,在DNS中注册,不适用DNS的情况下配置1个SCAN IP到/etc/hosts      中
 
Node    Interface Name    Type    Ip Address    Registered in    
macleandb-007    macleandb-007    Public    192.168.18.227    /etc/hosts    
macleandb-008    macleandb-008    Public    192.168.18.231    /etc/hosts    
macleandb-007    macleandb-007-vip    VIP    192.168.18.226    /etc/hosts    
macleandb-008    macleandb-008-vip    VIP    192.168.18.230    /etc/hosts    
macleandb-008    macleandb-scan1    SCAN IP    192.168.18.224    /etc/hosts    
macleandb-007    macleandb-007-priva    Private    172.168.1.101    /etc/hosts    
macleandb-008    macleandb-008-priva    Private    172.168.1.102    /etc/hosts    
macleandb-007    macleandb-007-privb    Private    172.168.2.101    /etc/hosts    
macleandb-008    macleandb-008-privb    Private    172.168.2.102    /etc/hosts    
 
 
使用FTP测试网络传输速率,2节点传输文件平均速度为50M/s:
 
 
macleandb-007 # scp p10404530_112030_AIX64-5L_1of7.zip  macleandb-008-priva:/oracleThe authenticity of host ‘macleandb-008-priva (172.168.1.102)’ can’t be established.RSA key fingerprint is b1:2e:4f:40:7f:46:39:2d:ae:21:86:6f:75:bb:92:32.Are you sure you want to continue connecting (yes/no)? yesWarning: Permanently added ‘macleandb-008-priva,172.168.1.102′ (RSA) to the list of known hosts.p10404530_112030_AIX64-5L_1of7.zip                                                                                                     20%  343MB  47.3MB/s   00:28 ETAKilled by signal 2. 

 
macleandb-007 # scp p10404530_112030_AIX64-5L_1of7.zip  macleandb-008-privb:/oracle
The authenticity of host ‘macleandb-008-privb (172.168.2.102)’ can’t be established.
RSA key fingerprint is b1:2e:4f:40:7f:46:39:2d:ae:21:86:6f:75:bb:92:32.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added ‘macleandb-008-privb,172.168.2.102′ (RSA) to the list of known hosts.
p10404530_112030_AIX64-5L_1of7.zip                                                                                                     11%  202MB  51.2MB/s   00:28 ETAKilled by signal 2.
macleandb-007 #
 
macleandb-007 # scp p10404530_112030_AIX64-5L_1of7.zip  macleandb-008:/oracle
p10404530_112030_AIX64-5L_1of7.zip                                                                                                     17%  299MB  50.6MB/s   00:27 ETAKilled by signal 2.
   

 
 
 
1.1       缺省网关:
在每台机器上都要对于公网接口定义缺省网关。
定义网关是为了跨网段的客户端和应用服务器可以访问数据库服务器;如果操作系统已经
配置了静态或动态路由,此处无需再配置网关。
 
 
1.2       时钟同步:
11.2中使用GI自带的CTSSD节点间时间同步服务,不开启NTPD时间同步守护进程。
 
NTP is not required for 11gR2 since we have the Cluster Time Synchronization Service (CTSD), but if youare using NTP you need to use it with â..-xâ.. option:Checking: ps -ef |grep ntpsIf it has no -x option do below steps:

· a. Open the /etc/rc.tcpip file, and locate the following line: start /usr/sbin/xntpd “$src_running”
· b. Change the line to the following: start /usr/sbin/xntpd “$src_running” “-x”
· c. Save the file.
   

 
 
 
 
 
1.3       用户和组:
创建必要的grid和oracle用户,以及oinstall、dba等组,保持在2个节点间的UID、GID一致
 
macleandb-007 # mkgroup -’A’ id=’1000′ adms=’root’ oinstallmacleandb-007 # mkgroup -’A’ id=’1100′ adms=’root’ asmadminmacleandb-007 # mkgroup -’A’ id=’1200′ adms=’root’ dbamacleandb-007 # mkgroup -’A’ id=’1300′ adms=’root’ asmdbamacleandb-007 # mkgroup -’A’ id=’1301′ adms=’root’ asmopermacleandb-007 # mkuser id=’1100′ pgrp=’oinstall’ groups=’asmadmin,asmdba,asmoper’ home=’/home/grid’ gridmacleandb-007 # mkuser id=’1101′ pgrp=’oinstall’ groups=’dba,asmdba’ home=’/home/oracle’ oracle

macleandb-007 # mkdir -p /oracle/app/product/11.2.0/db_1
macleandb-007 # mkdir -p /oracle/app/product/grid
macleandb-007 # chown oracle:oinstall /oracle/app/product/11.2.0/db_1
macleandb-007 # chown grid:oinstall /oracle/app/product/grid
macleandb-007 # chmod 755 /oracle/app/product/11.2.0/db_1
macleandb-007 # chmod 755 /oracle/app/product/grid
 
 
macleandb-008 # mkgroup -’A’ id=’1000′ adms=’root’ oinstall
macleandb-008 # mkgroup -’A’ id=’1100′ adms=’root’ asmadmin
macleandb-008 # mkgroup -’A’ id=’1200′ adms=’root’ dba
macleandb-008 # mkgroup -’A’ id=’1300′ adms=’root’ asmdba
macleandb-008 # mkgroup -’A’ id=’1301′ adms=’root’ asmoper
macleandb-008 # mkuser id=’1100′ pgrp=’oinstall’ groups=’asmadmin,asmdba,asmoper’ home=’/home/grid’ grid
macleandb-008 #  mkuser id=’1101′ pgrp=’oinstall’ groups=’dba,asmdba’ home=’/home/oracle’ oracle
macleandb-008 #  mkdir -p /oracle/app/product/11.2.0/db_1
macleandb-008 # mkdir -p /oracle/app/product/grid
macleandb-008 # chown oracle:oinstall /oracle/app/product/11.2.0/db_1
macleandb-008 # chown grid:oinstall /oracle/app/product/grid
macleandb-008 # chmod 755 /oracle/app/product/11.2.0/db_1
macleandb-008 # chmod 755 /oracle/app/product/grid
 
 
 
 
 
 
 
macleandb-007 # id oracle
uid=1101(oracle) gid=1000(oinstall) groups=1200(dba),1300(asmdba)
 
macleandb-007 # id grid
uid=1100(grid) gid=1000(oinstall) groups=1100(asmadmin),1300(asmdba),1301(asmoper)
 
macleandb-008 # id oracle
uid=1101(oracle) gid=1000(oinstall) groups=1200(dba),1300(asmdba)
 
macleandb-008 # id grid
uid=1100(grid) gid=1000(oinstall) groups=1100(asmadmin),1300(asmdba),1301(asmoper)
 
   

 
 
赋予grid用户CAP_NUMA_ATTACH等权限:
 
 
macleandb-008 # lsuser -a capabilities gridgridmacleandb-008 # chuser capabilities=CAP_NUMA_ATTACH,CAP_BYPASS_RAC_VMM,CAP_PROPAGATE gridmacleandb-008 # lsuser -a capabilities gridgrid capabilities=CAP_NUMA_ATTACH,CAP_BYPASS_RAC_VMM,CAP_PROPAGATE

 
   

 
 
1.1       用户profile:
 
在profile文件中为Oracle和Grid用户配置必要的环境变量参数:
 
Grid profileumask 022export AIXTHREAD_SCOPE=Sexport ORACLE_HOME=/oracle/app/product/grid

export ORACLE_BASE=/oracle/app
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH
export CRS_HOME=$ORACLE_HOME
export LIBPATH=$ORACLE_HOME/lib
 
 
 
oracle profile
 
umask 022
 
export AIXTHREAD_SCOPE=S
export ORACLE_HOME=/oracle/app/product/11.2.0/db_1
export ORACLE_BASE=/oracle/app
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH
export LIBPATH=$ORACLE_HOME/lib
export ORA_NLS10=$ORACLE_HOME/nls/data
export NLS_LANG=”Simplified Chinese”_China.AL32UTF8
 
   

 
 
 
1.1       配置oracle和grid用户的shell limit参数:
 
可以通过smitty chuser或者 修改/etc/security/limits配置文件配置用户的shell limit参数:
macleandb-007 # cat /etc/security/limitsoracle:fsize = -1data = -1stack = -1

core = -1
rss = -1
nofiles = -1
 
grid:
fsize = -1
data = -1
stack = -1
core = -1
rss = -1
nofiles = -1
 
$ ulimit -a
time(seconds)        unlimited
file(blocks)         unlimited
data(kbytes)         unlimited
stack(kbytes)        4194304
memory(kbytes)       unlimited
coredump(blocks)     unlimited
nofiles(descriptors) unlimited
threads(per process) unlimited
processes(per user)  unlimited
 
macleandb-008 # cat /etc/security/limits
 
oracle:
fsize = -1
data = -1
stack = -1
core = -1
rss = -1
nofiles = -1
 
grid:
fsize = -1
data = -1
stack = -1
core = -1
rss = -1
nofiles = -1
 
 
$ ulimit -a
time(seconds)        unlimited
file(blocks)         unlimited
data(kbytes)         unlimited
stack(kbytes)        4194304
memory(kbytes)       unlimited
coredump(blocks)     unlimited
nofiles(descriptors) unlimited
threads(per process) unlimited
processes(per user)  unlimited

AIX ORACLE INS 10102

6. 关于HP-UNIX下使用ntpq -p 的问题

ntpq 命令开启NTP查询程序,你man一下ntpq就知道了其作用, 
ntpq -p,-p参数显示所有已知的连接到NTP服务器的客户机信息列表以及他们的状态汇总,你这个结果显然是目前没有连接到NTP服务器的客户端。 
自己多看看文档有帮助的 
文档部分原文: 
Purpose 
Starts the standard Network Time Protocol (NTP) query program. This command only 
applies to AIX 4.2 or later. 

-p Displays a list of the peers known to the server and a summary of their 
state. Same as using the peers subcommand.

xntpd是一个关于网络时间协议的守护进程,它遵循了因特网时间服务器的通用标准。在启动 xntpd 时, xntpd 会读取 /etc/ntp.conf 配置文件来确定网络中系统时钟服务器,以 ntp 服务器的系统时间为标准,来调整本机的系统时间。
可以用 ntpq 命令来显示 xntpd 进程的内部变量。使用 ntp 时应注意,xntpd 服务器和 xntpd 客户端的时钟不能相差超过1000秒。若有大于1000秒的偏移,在客户端启动 xntpd 守护进程前,用 data 命令或 ntpdate 命令调整本机的系统时间,使偏移量在1000秒之内。 然后启动 xntpd.

1. 构造一个NTP环境的基本步骤(假设NTP不是运行在SP上):
1.1 设置NTP 服务器 (MASTER) , 其它NTP客户服务器以此服务器的时间为准,与其进行时间同步.
1.1.1 编辑 /etc/ntp.conf 文件, 内容如下:
----------------------------
#broadcastclient
server 127.127.1.0
driftfile /etc/ntp.drift
tracefile /etc/ntp.trace
----------------------------
请注意文件中的 server 127.127.1.0 这一行, 此处的127.127.1.0 是一特殊的地址,表示NTP主服务器是与自身的系统时钟同步.
1.1.2 编辑好 /etc/ntp.conf后, 启动xntpd守护进程
# startsrc -s xntpd
也可通过调用smitty , 使 xntpd 在以后重启服务器时能自动启动.
# smitty xntpd

1.1.3 xntpd 状态查询 , 使用 #lssrc -ls xntpd
刚启动xntpd时, sys peer 为 'insane', 表明xntpd还没有完成同步, .
#lssrc -ls xntpd
Program name: --/usr/sbin/xntpd
Version: -------3
Leap indicator: 11 (Leap indicator is insane.)
Sys peer: ------no peer, system is insane
...

等待 6 - 10 分钟后, sys peer 就不再是 'insane' 了.
#lssrc -ls xntpd
Program name: --/usr/sbin/xntpd
Version: -------3
Leap indicator: 00 (No leap second today.)
Sys peer: ------127.127.1.0
...
1.2. NTP客户端的设置
1.2.1 编辑 NTP 客户端上的 /etc/ntp.conf文件, 内容如下:
----------------------------
#broadcastclient
server 9.185.43.189
driftfile /etc/ntp.drift
tracefile /etc/ntp.trace
----------------------------
其中的 server 9.185.43.189 表明, 此客户端与IP地址为 9.185.43.189 的NTP服务器进行时间同步.
1.2.2 在NTP客户端启动xntpd守护进程
# startsrc -s xntpd
也可通过调用smitty , 使 xntpd 在以后重启服务器时能自动启动.
# smitty xntpd
1.2.3 查询xntpd的状态
当 system peer 不为 'insane' 时, 表明客户端已与服务器端成功地进行了同步.
# lssrc -ls xntpd
Program name: --/usr/sbin/xntpd
Version: -------3
Leap indicator: 00 (No leap second today.)
Sys peer: ------9.185.43.189
...