In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
HP Unix server shutdown and restart
shutdown: shutdown -hy 0
Restart: shutdown -ry 0
1. bdf #View disk usage (similar to df -h) bdf| grep
2. Glance #Glance Monitoring Tool is a powerful and easy-to-use online monitoring tool for HP-UX systems, including CPU, Memory, Disk IO, Network, NFS, System Calls, Swap, and System Table.
3. netstat -in #View Server IP information (similar to ifconfig, ifconfig requires a specified interface command, e.g. ifconfig lanX)
4. sam #HP Unix Graphics Management Command
5. tail-10f/var/adm/sy/sy.log #View the latest update to syslog file 10 lines
6. history -100 #View the first 100 historical commands
7. uname -a #View system info
8. env #View all environment variables
9. man command #Show command help information
10. vmstat 1 5 #Real-time query performance usage, refreshed every 1 second, a total of 5 lines are displayed
11. du -sk #View file size
du -sk ./* | sort -rn #folders sorted by size
12. machinfo #Show server device information
13. ioscan -fn #List all relevant information of each I/O card and device: such as logical unit number, hardware address and device file name, etc.
14. ioscan -fnC #Category View Hardware Information-fnCdisk #View Disk Type/ -fnCfc #View Fibre Card/ -fnClan #View Network
15. vgdisplay -v /dev/vg00 #Display logical volume group information
16. lvdisplay -v /dev/vg00/lv* #Display various information of logical volume current Normal, stale damaged
17. mount -o soft,forcedirectio xxxx:xxx/xx/xx/xx #With soft mount, it will try to connect to NFS server in the foreground, and terminate the mount attempt after receiving error message and give relevant information.
18. ntpq -p #Check NTP time difference output xxx.tar
#tar -xvf xxx.tar --> Output xxx
29.
compressed folder
# tar -cvf package file source file
#tar cvf - test |gzip -qc > test.tar.gz Pack first then compress
compressed file
# gzip xxxx ### xxxx.gz
# gunzip xxxx.gz
30. View inode usage
bdf -i
# bdf -i
Filesystem kbytes used avail %used iused ifree %iuse Mounted on
/dev/vg00/lvol4 35848192 27870232 7933424 78% 195589 249307 44% /
/dev/vg00/lvol1 1835008 468776 1355616 26% 341 42667 1% /stand
/dev/vgsdm21/lvcrs 10240000 3673869 6155994 37% 13866 1641530 1% /clusterware/SDM
/dev/vgsdm22/lvoracle
30720000 13217482 16453580 45% 184157 4375627 4% /oracle/SDM
/dev/vgsdm23/lvarc 138240000 31128033 100417596 24% 38 26777990 0% /oracle/SDM/arc_s
/dev/vgsdm24/lvarcbak
138240000 65228707 68448316 49% 141 18252823 0% /oracle/SDM/arc_s_bak
31. View HP Unix kernel parameters
#kctune
32. Modify HP Unix kernel parameters
#kctune vxfs_ifree_timelag=0
33. usermod -c [comment] [login name] #Add comment to account
#usermod -c li.xiao sdsz015
34. usermod -c "" [login name] #Unannotate the account with "", with no characters between the double quotes.
#usermod -c "" sdsz009
35. The requested URL/sbin/init.d/xntpd [stop] [start] was not found on this server.
36. parstatus # RX8640 View Hardware Information
37. setboot # HP Unix B.11.31 to see if there is Hyperthreading : ON, HP Unix B.11.23 server restart into EFI to see
38. Empty the wtmps and btmps files with the following command
cat /dev/null > /var/adm/wtmps
cat /dev/null > /var/adm/btmps
39. last -R| more #Show previous successful login messages
lastb -R #Display information about previous failed logins
40. [zmosdbs->root:/infra/OS/WORK]# ./ kmeminfo #View memory info
41. export TMOUT=0 #Don't let shell session exit automatically
42. nwmgr #Network interface management command, check whether to configure APA dual network card binding
43. CM-->df -all -nc #Collect MP information
44. The nohup command and its output file
The nohup command: If you are running a process and you think it will not end when you exit your account, use the nohup command. This command allows you to continue running the process after you log out of the account/close the terminal. Nohup means no hang up.
The general form of this command is: nohup command &
Submit jobs using the nohup command
If you submit a job using the nohup command, all output from the job is redirected by default to a file named nohup.out, unless you specify an output file:
nohup command > myout.file 2>&1 &
45. Move to the specified directory according to time
# find . -mtime +90 -exec mv {} /var/tmp/date_90 \;
find . -mtime +365 -type f -name "*.trc" -exec rm -f {} \;
Retain nearly 600 days of data
46. file [filename] Tests the specified file, trying to guess the file type and display it
47. HP-UX umount file system times device busy--four steps with fuser command:
1. Confirm that the mount has processes that need to be killed
#fuser -cu /mount_point
2. Send a SIGKILL signal to the process:
#fuser -ck /mount_point
3. Check to see if any more processes are accessing the mount
#fuser -c /mount_point
4. mount mount point
#umount /mount_point
48. cat /etc/passwd |grep -E 'root| maxi50'filter multiple sets of keywords
49. dd command interpretation
dd if=/dev/zero of=/dev/rdisk/disk29 bs=1024k count=1000 ---> Empty the device, write a 1024k file, write 1000 times
dd: copies a file in blocks of a specified size and performs specified transformations while copying.
Note: Multiply the number specified if it ends with: b=512;c=1;k=1024;w=2
Parameter Notes:
1. if= filename: Enter the filename, default to standard input. That is, specify the source file.
< if=input file >2. of= filename: output filename, default is standard output. That is, specify the destination file.
< of=output file >3. ibs=bytes: reads bytes bytes at a time, i.e. specifies a block size of bytes bytes.
obs=bytes: Output bytes bytes at a time, i.e. specify a block size of bytes bytes.
bs=bytes: Set the block size of read/output to bytes at the same time.
4. count=blocks: copies only blocks, the block size is equal to the number of bytes specified by ibs.
50. swremove uninstall patch pack
51. swinstall -s install patch pack
52. ln -s #Create soft link
-----------------------------------------------------------------------------------
network aspect command
1. nwmgr #Unified command for managing all HP-UX LAN interfaces and RDMA interfaces
nwmgr --get #Lists all LAN interfaces and RDMA interfaces in the system
nwmgr -S apa -I 2 -A all #View lan2 details
You can use the nwmgr command on LAN interfaces or RDMA interfaces to do the following:
- Display interface information
- Modify interface settings
- Reset the interface or its statistics
- Connectivity of diagnostic links
- Also create and set configuration information for components
- Delete or clear components
2. netstat -in #View Server IP information (similar to ifconfig, ifconfig requires a specified interface command, e.g. ifconfig lanX)
3. netstat -rn #Check if IP address binding is correct
4. lanscan #Check the underlying physical status of the host, whether UP,(note that this command cannot see the IP layer)
5. nslookup hostname #See if you can parse yourself
6. lanadmin #local area network administrator
Assuming the corresponding port is LAN2, check with the following command:
#lanadmin -g 2 | grep Status
Administration Status (value) = up(1)
Operation Status (value) = up(1)
---------------------------------------------------------------------------------
disk management command
1. View current disk status
#ioscan -fnC disk --------------> Legacy DSF (Legacy Device File)
# ioscan -fnNkC disk ---------------> Persistent DSF (device file after multipath aggregation using the system)
# ioscan -m lun ------------------------> View the information of lun drawn over
# ioscan -m dsf ------------------> (correspondence between aggregated device file names and legacy device files)
# ioscan -fnH 41/0/1/2/0/0 -----------> View 41/0/1/2/0/0 status information
# ioscan -P health -C disk --------> Check disk online status
2. Scan IO device changes
# ioscan
3. View disk and corresponding path
#ioscan -m dsf
3. View disk details
# diskinfo /dev/rdisk/diskxx
4. View disk file size in kilobytes
# dh -sk
--------------------------------------------------------------------------------------
performance analysis command
2. Glance #Glance Monitoring Tool is a powerful and easy-to-use online monitoring tool for HP-UX systems, including CPU, Memory, Disk IO, Network, NFS, System Calls, Swap, and System Table.
4. sam #HP Unix Graphics Management Command
10. vmstat 1 5 #Real-time query performance usage, refreshed every 1 second, a total of 5 lines are displayed
20. cat /var/adm/syslog/syslog.log| grep WARNING #View warning logs in the system log
5. tail-10f/var/adm/sy/sy.log #View the latest update to syslog file 10 lines
21. There is an error buffer in dmesg #system, and the system puts its self-test information, errors and alarms encountered in this buffer.
12. machinfo #Show server device information
22. Analyze memory usage tools (./ kmeminfo plus parameters)
cd /infra/OS/WORK/
./ kmeminfo (-user)
23. swlist| more #View all products installed on this machine
-----------------------------------------------------------------------
fiber card command
1. Check how many HBA cards there are in this unit
ioscan -fnC fc
2. Display WWN number with fcmsutil
fcsmutil
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.