Some of Solarise Q and A (Reposted)

zhaozj2021-02-16  103

Hardware system: 1, how to view the status of CUP? Author: South Africa spider  # psrinfo -v # mpstat list the status of more than 2 cpu load, how to view memory? Author: South Africa spider  # prtconf | grep 'Memory' can see how much memory # / usr / platform / sun4u / sbin / prtdiag 3, how to dynamically add a swap partition.? # $ su - root ----- Become a super user # mkfile 100m / home / swapfile ----- Create a 100M SWAP file # / usr / sbin / swap -a / path / filename ----- Activate SWAP File # / usr / sbin / swap -l ----- Verify SWAP file # / usr / sbin / swap -d / path / filename ----- Cancel SWAP file # rm -rf / home / swapfile --- - Delete SWAP files 4, how to see if the current network card is the rate? Author: South Africa Spider # dmesg | grep Link 5, how to adjust the x-window resolution and refresh rate? Character interface login, run: # / kdmconfig 6, how to use light, floppy drive? Under normal circumstances: # /etc/init.d/volmgt start # Volcheck or above, use: # /etc/init.d/volmgt stop # mount -f hsfs -o ro / dev / dsk / c0t6d0s0 / cdrom - - Mounting Capable # mount -f PCFS / DEV / DISKETTE0 / FLOPPY - Mount Swing Solaris Define System Disk File System Description: UFS - UNIX File System. It is the default file system of Solaris. HSFS - High-density CD-ROM file system is read-only file system. PCFS - PC file system, support DOS formatted floppy disk 7, what is the name rule of SCSI device? The use of a hard disk with a bus controller, the hard disk name habit of the bus controller is listed below: CWTXDysz C Logical Controller Number T Physical Bus Target Number D Drive Number S SLICE (OR Partition) Number (0 to 7), for example: / DEV / RDSK / C0T0D0S0 The original interface corresponds to the first hard disk of the first SCSI target address of the first controller, the first disk of the first hard disk / DEV / RDSK / C0T0D0S2 corresponding to the first controller. The third piece of the first hard disk on a SCSI target address 8, how to view the use of the hard disk? Author: South Africa spider  # df -k can see the amount of space a file system has been installed and the remaining space. # qota -v  View the user's disk space information, if you limit the user's space size with quota. # du -sk *   View the usage of the directory # du -k | sort -n can quickly discover that directory is the biggest. 9, how to view hard drive physical information? # Format This command can also view the type of hard disk and the detail of the partition.

Author: South Africa spider  # isainfo see core bit, # isainfo -kv adjust the kernel # modinfo display loadable modules # prtconf display system hardware configuration (Peripherals) #sysdef display loadable modules, and hardware configuration Some of the core can be adjusted reference values ​​#ulimit -a 11, print the current version of OBP: gunguymadman007 # prtconf -V OBP 3.20.0 2000/10/24 10:47 # / usr / platform / sun4u / sbin / prtdiag - V | grep OBP OBP 3.20.0 2000/10/24 10:47 Post 6.1.0 2000/10/24 10:49 OK. .version Release 3.20 Version 0 Created 2000/10/24 10:47 OBP 3.20.0 2000 / 10/24 10:47 POST 6.1.0 2000/10/24 10:49 OBDIAG 4.5.1 2000/10/24 10:48 12, and view the activation system 32 or the 64-bit kernel mode oF: gunguymadman007 64 bit mode # isalist -v sparcv9 vis sparcv9 sparcv8plus vis sparcv8plus sparcv8 sparcv8-fsmuld sparcv7 sparc # isainfo -v 64-bit sparcv9 applications 32-bit sparc applications # isainfo -b 64 64-bit kernel mode start ok. boot kernel / sparcv9 / UNIX 32-bit mode # isalist -v Sparcv8plus Vis sparcv8plus sparcv8 sparcv8-fsmull sparcv7 sparc copys # isainfo -b 32 launch 32-bit mode OK. boot kernel / unix 13, measure the current display refresh frequency # / usr / sbin / fbconfig -rev /? 14, how to configure a network card IP? # ifconfig -a - View the NIC, for example, HME0 # ifconfig hme0 unplumb - Stop NIC # ifconfig hme0 plumb - Database & Sql Blog Articles # i ifig hme0 inet 192.168.2.3 Netmask 255.255.255.0 Up - Add IP, Subnet Mask # Vi / etc / default adds the default route IP # vi /etc/hostname.hme0 Add host name # vi / etc / nodename Add Host Name # vi /etc/resolv.conf domain China.com Your domain name Nameserver 202.10.0.20 you NDS IP # vi /etc/nsswitch.conf Change Hosts: File DNS 15, PROM Status Commands and Parameter Format: OK> Instruction Command Description Banner Displays the current machine configuration, CPU, memory, Hostid, Ethernet probe-scsi display inside SCSI Channel Mounting Equipment ProBe-SCSI-ALL Displays all SCSI channels and mounted device Probe-IDE Displays all IDE channels and mounted devices (for U10, U5) Devalias display device alias, such as CDROM, Disk, Disk0, Disk1 and other Printenv have no parameters, display environment variables or parameters as environmental variables, such as Printenv Auto-Boot? Setenv Set environment variables, such as:

STENV AUTO-BOOT? FALSE SET-DEFAULT Recovery Environment Variable Subsequent Variables such as SET-Default Auto-Boot? Set-Defaults Restore All Environment Variables Boot Device Option Start Host Ease Access: CDROM or Disk Device Name: / PCI @ 1f , 4000 / SCSI @ 3,1 / disk @ 6,0: f Option -R device configuration - S single user Eject CDROM | FLOPPY pop-up CDROM or FLOPPY RESET Reset Test Net Watch-Net-All Show-Devs 16, find the NIC name and the number of interfaces: A propylene # grep network / etc / path_to_inst 17, how a piece of card to help set three ip, subnet mask and different? Illustration, card name hme0: # vi / etc / hosts 127.0.0.1 localhost 192.168.2.1 dbs loghost 192.168.9.15 dd 192.168.9.65 aa # vi / etc / netmasks 192.168.2.0 255.255.255.0 192.168.9.0 255.255.255.192 192.168. 9.64 255.255.255.252 #vi /etc/hostname.hme0 dbs #vi /etc/hostname.hme0:1 DD #vi /etc/hostname.hme0:2 aa # ipconfig hme0 inet 192.168.2..1 netmask 255.255.255.0 Up # ipconfig hme0: 1inet 192.168.9.15 Netmask 255.255.255.192 up # ipconfig hme0 inet 192.168.9.65 Netmask 255.255.255.252 Up # init 6 #ipconfig -a 18, how to view fiber optic hard drives in PROM? Author: Shenzhen stop a rookie into the ok status: ok> select optical card device name (available show-devs view) ok> show-children 19, host dual-screen setup. Author: iricyan 1.Confirm there are two Video Cards. 2. Confirm Driver Installed and Patches Installed If NEED.

3.Vi / usr / dt / config / xservers. Comment the last line. And UNcomment the nearest line Like this. 4.Reboot. 20, view hard disk parameters and their physical address: #Format 21, Display Disk Submissions: # prtvtoc / dev / rdsk / c0t0d0s2 system applications: 1 ,, check the system level # who -r look at run level 2, the process of the tool: e4gle pstop pid stop the process prun pid restart the process ptime pid process using micro-state calculation time pwait pid Waiting for the specified process Termination PCRED PID Display Credibility * Pfiles PID Displays FSTAT and FCNTL Information Opened Files * PFLAGS PID Displays each LWP / Proc Track Sign, Waiting, and Spectacles and Other Status Information * PLDD PID Display Link to each process Dynamic Link Library * PMAP PID Display Address Mapping Space * PSig PID Display Signal Operation * Pstack PID Display Each LWP 16 Binary and Symbol Stack Tracking * Ptree PID Display Contains Process Tree PID PID in the specified PID Displays the current working directory * must be executed by the superuser. These tools are in / usr / proc / bin / inside. 3, the installation of the PATCH package is numbered each patch. For example, the patch number is 101945. If the version is 34, this patch's directory name is 101945-34. # Patchadd 105160-01 Installation Patch # PatchRM Delete Patch # Patchadd -p Check System Patch Case # SHOWREV -P View all installed PATCH 4, how to allow root users to log in remotely? # vi / etc / default / login console = / dev / console --- Use # 注 注 这. 5, how to limit the number of TELNET logins? The default number is 47 solaris pts, modify / etc / system file, add the following: set maxusers = number of Number of set pt_cnt = 6, display of i-node number has been used and unused: gunguymadman007 # df -F ufs - oi 7, show the highest cpu usage of the process: gunguymadman007 # ps -eo pid, pcpu, args | sort 1n the command output pid current system processes, cPU usage and command descriptions, and ordered to pcpu 8, View the current version of OpenWindows: gunguymadman007 # showrev -w OpenWindows version: X11 version 6.4.1 5 November 2001 9, see the current version of CDE: gunguymadman007 # / usr / ccs / bin / what / usr / dt / bin / dtmail / USR / DT / BIN / DTMAIL: CDE VERSION 1.4.6_06 CDEVERSION 1.4.6_06 10, Wen ^ ^ M # Cat Test.dat | Test.out This can describe Test.dat Inside ^ m (/ 015) This character is removed, producing Test.out 11, shutdown command.

The way to turn off the system is different depending on the reasons of the shutdown. Execution is to turn to the execution level S, some are to stop the operating system and turn off the power of the device. (1) / usr / sbin / shutdown -gtime -ile -y (2) INIT 0 (3) HALT (4) STOP A; SYNC (5) Turns off the power emergency, press STOP_A, such as STOP_A does not work, turn off the device power to open again. This is extreme case. These two methods are not clean The closure is suddenly closed, only in an emergency. 12, how to send instant messages under Solaris? Use the wirte command to the terminal of a single user. $ wirte username Enter the message body, end pressing Ctrl-D, the message will appear in the user terminal. The user can use MESG N [Y] to determine if the accept message is started. With Wall, it is sent to all system users. $ Wall Hello, i love you ... End with Ctrl-d. rwall -n netgroup to all users on the network. $ rwall -n Workgroup ------- Sending each user hi! no smoking ... ending with Ctrl-D $ RWALL SUNE450 ----- or host name SUNE450. Usage is as above. . . 13. The system is SunOS5.8. I don't know why the only ordinary users can't get Terminal, VI, but the superuser can, how to remedy? Author: kesin replaced by /etc/skel/local.cshrc .cshrc out under the landing path, re-landing, OK! $ cp /etc/skel/local.cshrc. / What does this question when shutting down? Author: sunmarmot / usr / sbin / vold [724]: There was a problem [ID 244572 daemon.error] unloading / vol; interrupt system calls uxwdog [481]: [ID 248799 daemon.error] error communicating with server (Broken pipe) You haven't unloaded / vol to start, before you have problems, run: # umount -f / vol again. 15, the common example: command format: Find Dir -Name FileName Command Example: # Find. -Name Hello -Print Looking for the current directory and all sub-directory called Hello documents.

# Find. -ctime 7 -print to find the unhabited document within seven days # Find. -size 2000m -print to find out the size of more than 2000 bytes # Find / Tmp -user b1234567 -print belongs under / TMP Document B1234567 Document # Find. -Name '* .c' -EXEC RM {} Deletes all .c file # find. -name test / * -print Display the current directory and its subdirectories before 4 file names for TEST 16. What should I do if I forget the root port of Solarsi? Author: South Africa Spider Method One: 1. Do not be afraid, come with me solaris 2. Put your CD into the cdrom 3. Type stop a 4. when there is 'ok' word, type boot cdrom -s 5.cd. / TMP 6.mkdir / TMP / XXX (XXX is nothing to do) 7.Mount / dev / dsk / c0t0d0s0 / tmp / xxx (here C0T0D0S0 is your root disk) 8. Run CSH 9.Term = Sun; Export Term or STENV TERM VT220 10.cp / TMP / ROOT / XXX / Shadow / TMP/Root / XXX/Shadow/Shadow.backup 11.vi / TMP / ROOT / XXX / Shadow and delete the root in Password . 12. Restart, you can log in with a passwordless root, then change your password. If there is no shadow, then the x behind the ROOT username in / etc / passwd, you can make a method: find a system-free Solaris machine, put the system of forget your password into the mount, repeat method 10 Steps. Solaris for x86 machine: Start with CD When you want to install it, you will leave the order user, and the rest is as above.

17, decompression of the common file: South Africa spider  In general, under solaris, is there such software in several formats: 1) .gz end of the document, we use gunzip or gzip -d to decompress, and then TAR to decompress. 2) .TAR ended file, we must know that using TAR XVF format to decompress. 3) The file ended in. We use unzip, note that this is only under the high version of Solaris, is only. And This file format is more than Solaris's PATCH. 4). Z end files, we generally use uncompress to extract (of course, everyone's habits are different.) The above is unzipped, generally decompressed, will generate such several Method: 1) Generate .local file, this time we use: pkgadd -d xxx.local to install. 2) Generate a directory, and some PKG information will be used in this directory, we use: pkgadd -d.; In the current directory, install and install it according to the default path. 3) Generate a digital directory, generally refer to the Solaris Patch, this time we use patchadd to install. 18, how to replace a file in the command line interface Character segment? # vi file Enter:: 1, $ s / diag / peng / g full file lookup DIAG and replace it with Peng 19, how are TERM = VT100 and TERM = DTTERM? Author: Under normal circumstances C.Arthur if you landed on the machine's display or via XMANAGER such as landing, it defaults to dtterm, telnet generally ansi, when you modify a file via telnet, the need to set TERM = VT100; export TERM 20, how to check the version of the system? $ uname -x $ more / etc / release 21, the command line enters CDE: # / usr / dt / bin / dtlogin -daemon; exit or # / etc / rc2.d / s92dtlogin start; exit; 22, view the Patch installation process Return the meaning of the error code: #MORE / USR / SBIN / PATCHADD 23, how to log in from a SOL8 machine to another SOL8 CDE desktop. Click on the menu when you log in to CDE: Select - Log in to the remote host - 24, how to view your default language environment? C.Arthur # more / etc / default / init 25, how to change / HOME permissions? Author: xieliangcheng stopped autofs service, or the / etc / auto_master the home commented: #vi / etc / auto_master ------------ ---------- follows # Master Map for Automounter # AUTO_MASTER / NET -HOSTS -NOSUID, Nobrowse # / Home Auto_Home -NobrowSe / XFN -XFN

Third-party software applications or techniques: 1, view the current version of bind information Author: gunguymadman007 # nslookup -class = chaos -q = txt version.bind

2. Display the message specified by the system when logging in?

#vi / etc / motd ---- Remove all outdated messages, enter new messages Note: For users who have been logged in and are using the system, the message exceeding one screen cannot be displayed. After each modify the file, the timestamp of the file is updated. 3, remove the text ^ m

# DOS2UNIX AAA.TXT BBB.TXT will remove ^ m in AAA.TXT to generate a bbb.txt file. 4. Find the TXT file in the system in the system and package it. # Find / -mtime -7> aaa.txt # tar cvf bbb.tar -i aaa.txt --- Find the file record in the AAA.TXT file, is made as a bbb.tar file package. 5, find and delete the older file than a day: #find.! -Mtime - | / usr / bin / xarys rn -rf

6,

SOLARIS9 unable to correctly enter Chinese solutions:

In the user directory in #vi .profile, modified as follows:

Stty CS8 -ISTRIP

7. How do I prevent Telnet from being played too long?

Here, VI / ETC / Default / Login

# Timeout sets the number of seconds (between 0 and 900) to wait before

# Abandoning a login session.

#

# TIMEOUT = 300

After the modification, it is not immediately taken, and the Login Session after this is in line with this requirement, but the connection that has been established before modification is not affected.

8, how to install GCC.

Go to the GCC version of the PKG package for downloading the corresponding platform on sunfreeware.com.

#pkgadd -d gcc *

Set environment variables:

Bash and SHell:

VI $ HOME / .profiel

PATH = / bin: / usr / sbin: / etc: / usr / local / bin: / usr / ccs / bin; Export Path

CC = GCC; Export CC

CSH's shell:

VI $ homen / .cshrc

SET PATH = (/ bin / usr / bin / usr / ucb / etc / usr / local / bin / usr / local / sbin.)

STENV CC GCC

9, list the directory in the current directory.

Author: brucewoo ls -al | grep '^ d' 10, use the command line to open a new terminal.

转载请注明原文地址:https://www.9cbs.com/read-11203.html

New Post(0)