Solaris Quick Reference Manual

Source: Internet
Author: User
Hardware System: f3jlinux Alliance
F3jlinux Alliance
1. How can I view the CPU status? Author: South African spider f3jlinux Alliance
# Psrinfo-V f3jlinux Alliance
# Mpstat can list the statuses of multiple CPU loads f3jlinux Alliance
F3jlinux Alliance
2. How to view memory? Author: South African spider f3jlinux Alliance
# Prtconf | grep 'memory 'to check the memory size. f3jlinux Alliance
#/Usr/platform/sun4u/sbin/prtdiag f3jlinux Alliance
F3jlinux Alliance
3. How to dynamically add swap partitions? # $ Su-root ----- become the Super User f3jlinux Alliance
# Mkfile 100 m/home/swapfile ----- create M swap file f3jlinux Alliance
#/Usr/sbin/swap-A/path/filename ----- activate the swap file f3jlinux Alliance
#/Usr/sbin/swap-l ----- verify the swap file f3jlinux Alliance
#/Usr/sbin/swap-D/path/filename ----- cancel the swap file f3jlinux Alliance
# Rm-RF/home/swapfile ----- Delete the swap file f3jlinux Alliance
F3jlinux Alliance
4. How can I check the speed at which the current Nic is going up? Author: South African spider f3jlinux Alliance
# Dmesg | grep link f3jlinux Alliance
F3jlinux Alliance
5. How to adjust the resolution and refresh frequency of X-window? F3jlinux Alliance
Log on to the character interface and run: #/kdmconfig f3jlinux Alliance
F3jlinux Alliance
6. How to Use optical and soft drive? F3jlinux Alliance
Generally used: f3jlinux Alliance
#/Etc/init. d/volmgt start f3jlinux Alliance
# Volcheck f3jlinux Alliance
The above method does not work. Use: f3jlinux Alliance
#/Etc/init. d/volmgt stop f3jlinux Alliance
# Mount-F hsfs-O ro/dev/DSK/c0t6d0s0/CDROM -- mount the f3jlinux alliance of the optical drive
# Mount-F pcfs/dev/diskette0/Floppy -- attach to the f3jlinux Alliance
Solaris definition System Disk File System Description: f3jlinux Alliance
Ufs-UNIX file system. Is the default file system of Solaris. F3jlinux Alliance
Hsfs-high-density CD-ROM file system, is a read-only file system. F3jlinux Alliance
Pcfs-PC file system, supporting DOS-formatted floppy disk f3jlinux Alliance
F3jlinux Alliance
7. What are the naming rules for SCSI devices? F3jlinux Alliance
The hard drive with bus controller is used. The hard drive naming conventions of bus controller are listed below: f3jlinux Alliance
Cwtxdysz f3jlinux Alliance
C logical controller number f3jlinux Alliance
T physical Bus Target number f3jlinux Alliance
D Drive number f3jlinux Alliance
S slice (or partition) number (0 to 7) f3jlinux Alliance
Example: f3jlinux Alliance
/Dev/rdsk/c0t0d0s0 this original interface corresponds to the first disk (Root) f3jlinux alliance of the first SCSI destination address of the first Controller
/Dev/rdsk/c0t0d0s2 this original interface corresponds to the third Disk of the first SCSI destination address of the first controller (representing the entire hard disk) f3jlinux Alliance
F3jlinux Alliance
8. How can I view the hard disk usage? Author: South African spider f3jlinux Alliance
# DF-K shows the size of the installed file system and the remaining size. F3jlinux Alliance
# Quota-V: view the user's disk space information. If you use quota to limit the user space size. F3jlinux Alliance
# Du-SK * view directory usage f3jlinux Alliance
# Du-k | sort-N can quickly find that directory is the largest. F3jlinux Alliance
F3jlinux Alliance
9. How can I view the physical information of a hard disk? F3jlinux Alliance
# The format command can also view the hard disk type and partition details f3jlinux Alliance
# Iostat-e Check hard disk size and model f3jlinux Alliance
# Prtvtoc/dev/rdsk/c0t0d0s0 display the partition status of a disk f3jlinux Alliance
F3jlinux Alliance
10. view system kernel commands. Author: South African spider f3jlinux Alliance
# Isainfo view the kernel bit, f3jlinux Alliance
# Isainfo-kV adjustment kernel f3jlinux Alliance
# Modinfo display the loadable module f3jlinux Alliance
# Prtconf display system hardware configuration (peripheral devices) f3jlinux Alliance
# Sysdef displays the loaded modules, hardware configurations, and Adjustable Core reference values of f3jlinux
# Ulimit-A f3jlinux Alliance
F3jlinux Alliance
11. Print the current OBP version by gunguymadman007 f3jlinux Alliance
# Prtconf-V f3jlinux Alliance
OBP 3.20.0 2000/10/24 f3jlinux Alliance
#/Usr/platform/sun4u/sbin/prtdiag-v | grep OBP f3jlinux Alliance
OBP 3.20.0 2000/10/24 post 6.1.0 2000/10/24 f3jlinux Alliance
OK .. version f3jlinux Alliance
Release 3.20 version 0 created 2000/10/24 f3jlinux Alliance
OBP 3.20.0 2000/10/24 f3jlinux Alliance
Post 6.1.0 2000/10/24 f3jlinux Alliance
Obdiag 4.5.1 2000/10/24 f3jlinux Alliance
F3jlinux Alliance
12. View and start the 32-bit or 64-bit Kernel Mode of the system by gunguymadman007 f3jlinux Alliance
64-bit f3jlinux Alliance
# Isalist-V f3jlinux Alliance
Sparcv9 + vis sparcv9 sparcv8plus + vis sparcv8plus sparcv8 sparcv8-fsmuld sparcv7 iSCSI f3jlinux Alliance
# Isainfo-V f3jlinux Alliance
64-bit sparcv9 applications f3jlinux Alliance
32-bit iSCSI applications f3jlinux Alliance
# Isainfo-B f3jlinux Alliance
64 f3jlinux Alliance
Start 64-bit Kernel Mode f3jlinux Alliance
OK. Boot kernel/sparcv9/Unix f3jlinux Alliance
F3jlinux Alliance
32-bit f3jlinux Alliance
# Isalist-V f3jlinux Alliance
Sparcv8plus + vis sparcv8plus sparcv8 sparcv8-fsmuld sparcv7 iSCSI f3jlinux Alliance
# Isainfo-V f3jlinux Alliance
32-bit iSCSI applications f3jlinux Alliance
# Isainfo-B f3jlinux Alliance
32 f3jlinux Alliance
Start 32-bit f3jlinux Alliance
OK. Boot kernel/Unix f3jlinux Alliance
F3jlinux Alliance
13. determine the current display refresh frequency f3jlinux Alliance
#/Usr/sbin/fbconfig-Rev? F3jlinux Alliance
F3jlinux Alliance
14. How do I configure the NIC IP address? F3jlinux Alliance
# Ifconfig-A -- view the NIC, such as the hme0 f3jlinux Alliance
# Ifconfig hme0 unplumb -- stop the network adapter f3jlinux Alliance
# Ifconfig hme0 plumb -- enable the f3jlinux Alliance for NICs
# Ifconfig hme0 Inet 192.168.2.3 netmask 255.255.255.0 up -- add IP address and subnet mask f3jlinux Alliance
# Vi/etc/defaultrouter Add the default Route IP f3jlinux Alliance
# Vi/etc/hostname. hme0 Add the host name f3jlinux Alliance
# Vi/etc/nodename add host name f3jlinux Alliance
# Vi/etc/resolv. conf f3jlinux Alliance
Domain china.com your domain name f3jlinux Alliance
Nameserver 202.106.0.20 your nds ip f3jlinux Alliance
# Vi/etc/nsswitch. conf change hosts: file DNS f3jlinux Alliance
F3jlinux Alliance
15. Prom STATUS Command and parameter f3jlinux Alliance
Format: OK> command f3jlinux Alliance
Command description f3jlinux Alliance
Banner displays the current machine configuration status, CPU, memory, hostid, and Ethernet f3jlinux Alliance
Probe-SCSI: displays the f3jlinux Alliance, which is connected to the internal SCSI channel.
Probe-SCSI-All displays all SCSI channels and the f3jlinux alliance of mounted devices
Probe-ide shows all ide channels and connected devices (for U10, U5) f3jlinux Alliance
Devalias displays the device alias, such as CDROM, disk, disk0, disk1, and other f3jlinux alliances.
Printenv has no parameters and displays environment variables or f3jlinux Alliance
The parameter is the environment variable name, for example, printenv auto-boot? F3jlinux Alliance
Setenv: Set environment variables, such as setenv auto-boot? False f3jlinux Alliance
Set-Default: set-default auto-boot? F3jlinux Alliance
Set-defaults restore all environment variable values f3jlinux Alliance
Boot device option start host f3jlinux Alliance
Device alias: CDROM or disk f3jlinux Alliance
Device Name:/PCI @ 1f, 4000/SCSI @ 3, 1/disk @ 6, 0: F f3jlinux Alliance
Option-r Device Configuration f3jlinux Alliance
-S single-user f3jlinux Alliance
Eject CDROM | floppy pop-up CDROM or floppy f3jlinux Alliance
Reset reset f3jlinux Alliance
Test net f3jlinux Alliance
Watch-net-All f3jlinux Alliance
Show-Devs f3jlinux Alliance
F3jlinux Alliance
16. Search for the network card name and the number of interfaces Author: Alibaba f3jlinux Alliance
# Grep Network/etc/path_to_inst f3jlinux Alliance
F3jlinux Alliance
17. How can I define three IP addresses with different subnet masks for one network card? F3jlinux Alliance
For example, the NIC name hme0: f3jlinux Alliance
# Vi/etc/hosts f3jlinux Alliance
127.0.0.1 localhost f3jlinux Alliance
192.168.2.1 DBS loghost f3jlinux Alliance
192.168.9.15 dd f3jlinux Alliance
192.168.9.65 AA f3jlinux Alliance
# Vi/etc/netmasks f3jlinux Alliance
192.168.2.0 255.255.255.0 f3jlinux Alliance
192.168.9.0 255.255.255.192 f3jlinux Alliance
192.168.9.64 255.255.255.252 f3jlinux Alliance
F3jlinux Alliance
# Vi/etc/hostname. hme0 f3jlinux Alliance
DBS f3jlinux Alliance
# Vi/etc/hostname. hme0: 1 f3jlinux Alliance
Dd f3jlinux Alliance
# Vi/etc/hostname. hme0: 2 f3jlinux Alliance
AA f3jlinux Alliance
# Ipconfig hme0 Inet 192.168.2 .. 1 netmask 255.255.255.0 up f3jlinux Alliance
# Ipconfig hme0: 1 Inet 192.168.9.15 netmask quota limit 192 up f3jlinux Alliance
# Ipconfig hme0 Inet 192.168.9.65 netmask 255.255.252 up f3jlinux Alliance
# Init 6 f3jlinux Alliance
# Ipconfig-A f3jlinux Alliance
F3jlinux Alliance
18. How can I view a fiber-optic hard disk in the prom state? Author: Shenzhen cainiao f3jlinux Alliance
Stop + A enters the OK status: f3jlinux Alliance
OK> select the optical fiber card device name (can be viewed by show-Devs) f3jlinux Alliance
OK> show-Children f3jlinux Alliance
F3jlinux Alliance
19. Host dual-Screen Settings. Author: iricyan f3jlinux Alliance
1. Confirm there are two video cards. F3jlinux Alliance
2. Confirm Driver Installed and patches installed if need. F3jlinux Alliance
3. VI/usr/dt/config/xservers. f3jlinux Alliance
Comment the last line. f3jlinux Alliance
And uncomment the nearest line like this. f3jlinux Alliance
4. Reboot. f3jlinux Alliance
F3jlinux Alliance
20. View hard disk parameters and their physical addresses: f3jlinux Alliance
# Format </dev/null f3jlinux Alliance
F3jlinux Alliance
21. Display disk partitions: f3jlinux Alliance
# Prtvtoc/dev/rdsk/c0t0d0s2 f3jlinux Alliance
F3jlinux Alliance
F3jlinux Alliance
System Application: f3jlinux Alliance
F3jlinux Alliance
1. view the system running level f3jlinux Alliance
# Who-r view running level f3jlinux Alliance
F3jlinux Alliance
2. Process tool Author: e4gle f3jlinux Alliance
Pstop PID stop process f3jlinux Alliance
Prun PID restart process f3jlinux Alliance
Ptime PID uses the microstate computing process time f3jlinux Alliance
Pwait PID waits for the specified process to terminate f3jlinux Alliance
PCRed PID shows credibility * f3jlinux Alliance
Pfiles PID displays the fstat and fcntl information of opened files * f3jlinux Alliance
Pflags PID displays the/proc trace mark of each lwp, waiting for and waiting for semaphores and other status information * f3jlinux Alliance
Pldd pid shows the dynamic link library * f3jlinux Alliance linked to each process
Pmap PID display address ing space * f3jlinux Alliance
Psig PID display signal operation * f3jlinux Alliance
Pstack PID displays the hexadecimal and symbolic heap tracking of each lwp * f3jlinux Alliance
Ptree PID displays the f3jlinux alliance of the Process Tree Containing the specified PID
Pwdx PID displays the current working directory * f3jlinux Alliance
* Must be executed by a Super User. F3jlinux Alliance
These tools are in/usr/proc/bin. F3jlinux Alliance
F3jlinux Alliance
3. Install the f3jlinux package
Each patch is numbered. For example, if the patch number is 101945 and the version is 34, the directory name of the patch is 101945-34. f3jlinux alliance.
# Patchadd 105160-01 install the patch f3jlinux Alliance
# Patchrm Delete patch f3jlinux Alliance
# Patchadd-P check system patch situation f3jlinux Alliance
# Showrev-p view all installed patch f3jlinux Consortium
F3jlinux Alliance
4. How can I allow a root user to log on remotely? F3jlinux Alliance
# Vi/etc/default/login f3jlinux Alliance
Console =/dev/console --- use # To comment out this line. F3jlinux Alliance
F3jlinux Alliance
5. How do I limit the number of telnet logins? The default number of Solaris PTS is 47. Modify the/etc/system file and add the following content: f3jlinux alliance.
Set maxusers = Quantity f3jlinux Alliance
Set pt_cnt = Quantity f3jlinux Alliance
F3jlinux Alliance
6. Number of used and unused I-nodes: gunguymadman007 f3jlinux Alliance
# DF-f ufs-o I f3jlinux Alliance
F3jlinux Alliance
7. Process with the highest CPU usage: gunguymadman007 f3jlinux Alliance
# Ps-eo pid, pcpu, argS | sort + 1n f3jlinux Alliance
This command outputs the PID of the current system process, CPU usage and command description, and sorts f3jlinux Alliance by pcpu.
F3jlinux Alliance
8. view the current openwindows version by gunguymadman007 f3jlinux Alliance
# Showrev-W f3jlinux Alliance
Openwindows version: f3jlinux Alliance
X11 version 6.4.1 5 November 2001 f3jlinux Alliance
F3jlinux Alliance
9. view the current CDE version by gunguymadman007 f3jlinux Alliance
#/Usr/CCS/bin/what/usr/dt/bin/dtmail f3jlinux Alliance
/Usr/dt/bin/dtmail: f3jlinux Alliance
CDE version 1.4.6 _ 06 f3jlinux Alliance
Cdeversion1.4.6 _ 06 f3jlinux Alliance
F3jlinux Alliance
10. Remove the ^ m f3jlinux alliance in the text.
# Cat test. dat | tr-D '15'> test. Out f3jlinux Alliance
In this way, the ^ m (15) character in test. Dat can be removed to generate the test. Out f3jlinux alliance.
F3jlinux Alliance
11. shutdown command. F3jlinux Alliance
The way to shut down the system varies depending on the reason for the shutdown. Some are to go to the execution level s, some are to stop the operating system and turn off the power of the device. f3jlinux Alliance
(1)/usr/sbin/shutdown-gtime-ilevel-y f3jlinux Alliance
(2) Init 0 f3jlinux Alliance
(3) Halt f3jlinux Alliance
(4) Stop + A; sync f3jlinux Alliance
(5) power off f3jlinux Alliance
In an emergency, press stop_a. If stop_a does not work, power off the device and enable it. This is the f3jlinux alliance.
In extreme cases, these two methods are not clean and suddenly closed. They are only used in emergencies by the. f3jlinux alliance.
F3jlinux Alliance
12. How can I send instant messages under Solaris? F3jlinux Alliance
Use the wirte command to access a single user's terminal. F3jlinux Alliance
$ Wirte username f3jlinux Alliance
Enter the message body and press Ctrl-D. The message appears on the user terminal. F3jlinux Alliance
You can use mesg n [y] to determine whether to start receiving messages. F3jlinux Alliance
F3jlinux Alliance
Use wall to send data to all system users. F3jlinux Alliance
$ Wall f3jlinux Alliance
Hello, I love you... stop using Ctrl-D. f3jlinux
F3jlinux Alliance
Rwall-N netgroup to all users on the network. F3jlinux Alliance
$ Rwall-N workgroup -------- send to every user of the group workgroup f3jlinux Alliance
Hi! No smoking ...... end with Ctrl-D f3jlinux Alliance
F3jlinux Alliance
$ Rwall sune450 ------ or the host name is sune450. The usage is as follows ..?

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.