Hpunix routine maintenance command records

Source: Internet
Author: User

This document describes routine maintenance and commands and some file configurations used by HP engineers for maintenance and diagnosis.

Hardware environment: rp8400 + va7400 + ds2405 + lto library + Hp FC switch 8b

OS: HP UNIX 11i

Software environment: sanmgr + Hp OmniBack

1. Last-r-10 & lastb-r-10

2. Use the what Command (if you want to view the cause of a core file)
What Core

3. Use of TSM
In the TSM status, you can use Ctrl + W to switch the screen; Ctrl + T to call up the menu

4. How do I change the hostname and IP address?

# Set_parms

It can be:
Hostname (change host name)
Ip_address (Change IP address)

5. Use of the finger command
Finger-R (view the client information currently logged on to the host)

6. Use of the ESC key
In the command line, you can press the ESC key twice to match the unique file name in the current directory, which saves the time to insert a long file name.

7. Use of the col command
Man CP | col-B> cp.txt
This command can export a text file named cp.txt

8. Use the which command (view the absolute path of a command)
Which command name

9. view the language set installed in the system (locale-)

10. shows how long the system has been running, who is logged in, what is it?

W & uptime

11. view the current init level of the system (WHO-R)

12. display some system information (uname-)

13. What should I do if a Super User forgets the password?
* Restart the machine. After the self-check is completed, the line "to discontinue, press any key in 10 seconds" appears. Then you press any key,
The system suspends the startup and enters the main menu.
* Type "Bo" and ask "interact with IPL (Y or N?)?" in the system ?)?", Enter "Y ".
* Enter "HPUX-is" after the isl> prompt, and the system enters the single-user status.
* Type "passwd" and enter a new password.
* Type "init 3" to restore normal system operation.

14. Change the Host IP Address
A. First, use the "lanscan" and "ifconfig" commands to find the device name of the NIC.
B. Run the VI command to edit the/etc/rc. config. d/netconf file. Find
Interface_name [0] = lan1
Ip_address [0] = ""
Subnet_mask [0] = ""
Broadcast_address [0] = ""
Change the original IP address and subnet_mask to a new value.
C. Use the VI command to edit the/etc/hosts file and change the IP address of the corresponding host name.
Note: Do not directly change the IP address in the CDE environment. Exit the CDE environment and complete the modification process.

15. Monitoring of common log files

File Name Content Monitoring Method
/Etc/rc. Log: how to read text files,
/Var/adm/syslog. Log note the prompt information and corresponding
/Var/adm/SW/*. Log Software Installation Log Analysis problems.
/Var/adm/wtmp user logon information can be viewed using the last command
/Var/adm/btmp User Logon failure information can be viewed using the lastb command
/Var/SAM/log/samlog Sam log
/Var/spool/mqueue/syslog sendmail log
/Etc/shutdownlog shutdown Information
Logs viewed by/usr/ADM/diag/logxxx tools
/Var/adm/Nettl. log * network logs are handled by HP engineers

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.