728x90

Problem(Abstract)

How to determine the number of network cards on a AIX machine.

Resolving the problem

INTRODUCTION

You may need to find the IP address or addresses for your AIX system, but may not know whether the system contains more than one Network Interface Card (NIC).


METHOD

On AIX systems, the command ifconfig supports an option (-a) to list all of the interfaces on the machine. The output of ifconfig -a varies among operating systems, but should include the IP address of any Network Interface Card (NIC) on the machine.

The interface name will be a 3 to 4 character indicator like hme0, en0 or lc1. Each entry will always begin with the interface name and a colon. This will usually be followed by a set of flags. The flag LOOPBACK indicates that the interface is the local loop back interface and not an actual NIC. Somewhere in the entry for an NIC there is a keyword of inet followed by an IP address. This is the IP address of the interface.

Execute ifconfig -a and look for entries with IP addresses that are not 127.0.0.1. The IP addresses are preceded by inet

Note: Some systems that support IP version 6 (IPv6) will have two interfaces for each NIC, one for IPv6 and the other for IP version 4 (IPv4). The IPv6 interface will not have an inet parameter, instead it will have an inet6 parameter that will not look like an IP address. Instead of decimal numbers separated by periods an IPv6 address is made up of hexadecimal numbers separated by colons.


Examples:

Output from an AIX machine: 

The output shows that interface en0 is an actual NIC that has an internet (IP) address of 10.25.16.1 (IP addresses have been changed as a security precaution). The device lo0 is a local loop back as shown by the LOOPBACK flag and the internet address of 127.0.0.1

$ ifconfig -a
en0: flags=4e080863< UP,BROADCAST,NOTRAILERS,RUNNING,
SIMPLEX,MULTICAST,GROUPRT,64BIT,PSEG>
     inet 10.25.16.1 netmask 0xffffff00 broadcast 109.25.146.145
lo0: flags=e08084b < UP,BROADCAST,LOOPBACK,RUNNING,SIMPLEX,
MULTICAST,GROUPRT,64BIT>
     inet 127.0.0.1 netmask 0xff000000 broadcast 127.255.255.255
     inet6 ::1/0


Finding ifconfig

The ifconfig command may not be in your default PATH. Look in the following directories:


You can still use it by simply including the full path to the ifconfig file on the command line. If you cannot find ifconfig, check the man page for ifconfig or use the find command.

For more information, check with your system administrator or the operating system documentation.



http://www-01.ibm.com/support/docview.wss?uid=swg21187825

728x90
728x90

Question

Memory on AIX - How to use lsdev and lsattr to determine the amount of physical memory you have.

Answer

When tuning IBM® Informix® database servers you need to know the amount of memory on your IBM AIX® system. The values you use in the Shared Memory Parameters section of the onCONFIG configuration file determine the amount of memory the database server needs. The amount of memory on the computer limits how much memory the database server has available. 

On AIX you can use a combination of the commands lsdev and lsattr to determine how much memory the computer has. These commands (located in /usr/sbin) are used to display the system devices and their attributes. 


STEPS

    1. Log in as user informix 

    2. Run the command lsdev -C | grep mem

    3. For each device displayed in step 2., run the command:

      lsattr -El memX

        memX
          Device name from step 2.


      Example:

      This example is from a system with 3 GB of physical memory and one memory device named mem0.

        $ lsdev -C | grep mem

        mem0       Available 00-00        Memory


        $ lsattr -El mem0

        size   3072 Total amount of physical memory in Mbytes  False


Note: Please contact AIX support if you need additional help with these commands or other ways to identify the amount of memory on your computer.



https://www-304.ibm.com/support/docview.wss?uid=swg21143451

728x90
728x90

Question

Memory on Solaris - How to use prtconf to determine the amount of physical memory you have.

Answer

When tuning IBM Informix® database servers you need to know the amount of memory on your Solaris™ system. The values you use in the Shared Memory Parameters section of the onCONFIG configuration file determine the amount of memory the database server needs. The amount of memory on the computer limits how much memory the database server has available. 

On Solaris, you can use the command prtconf to determine how much physical memory the computer has. This command (located in /usr/sbin) displays the total amount of memory for the computer in megabytes. 


STEPS

    1. Log in as any user. Superuser or user informix is not required.

    2. Run the command  prtconf | grep Mem

    Example:

    This is an example from a system with 2048 megabytes (2 GB) of physical memory.

      $ prtconf | grep Mem

      Memory size: 2048 Megabytes


Note: Please contact your OS support if you need additional help with this command or other ways to identify the amount of memory on your computer.



https://www-304.ibm.com/support/docview.wss?uid=swg21143447

728x90
728x90

Problem(Abstract)

The NUMCPUVP and newer VPCLASS onCONFIG parameter should be set to one less than the actual number of physical CPUs present in the server. This document provides the commands to determine the number of CPUs on Sun machines.

Resolving the problem

When tuning various IBM Informix® products you need to know the number of processors on your system. The NUMCPUVP or VPCLASS cpu ONCONFIG configuration parameter, for instance, should be set to one less than the actual number of physical CPUs present in the server. 

On Sun Solaris you can determine how many processors your system has by using the unamecommand. Use the -X option to uname (located in /usr/bin) and look for the value of the parameter NumCPU. The -X option displays expanded system information as expected by SCO UNIX. See the man page for more information on uname -X. Use this command line:

    /usr/bin/uname -X

    Example:

    This example is from a machine with 4 CPUs. It also uses grep to limit the output.

      $ uname -X | grep Num
      NumCPU = 4
Note: Please contact Solaris for information regarding multi-core (e.g. T-5240) processors and threads.

Note: Please see the manuals and online documentation for NUMCPUVP and VPCLASS ONCONFIGconfiguration parameters.



http://www-01.ibm.com/support/docview.wss?uid=swg21105417

728x90
728x90

Question
Determining CPU Speed in AIX
 
Answer

This document applies to AIX Versions 4 and 5.

While there is not a direct command to determine processor speed in AIX V4, the best place to start is with the uname command. Executing uname -m produces output of the following form:

          xxyyyyyymmss
The meanings of the placeholders are as follows:
           xx = 00
       yyyyyy = Unique CPU ID
           mm = Model ID <- these are the numbers to use to determine CPU speed
           ss = 00 (Submodel)

By cross-referencing the values from the uname -m output with the table below, you can easily determine the processor speed.

To determine cpu speed with AIX V5 (which includes power5 systems and above), use the following commands:

     lsattr -El proc0
     prtconf
     pmcyles -m 

The frequency line returns the speed of the cpu. Note on some machines the value represented by the frequency line will have to be rounded to the nearest integer. For example, the frequency reported on a 7025-F80 is 451200000, which is then rounded to 450MHz.

 Model ID    Machine Type            Processor Speed          Architecture
 02          7015-930                     25                    Power
 10          7013-530                     25                    Power
 10          7016-730                     25                    Power
 11          7013-540                     30                    Power
 14          7013-540                     30                    Power
 18          7013-53H                     33                    Power
 1C          7013-550                    41.6                   Power
 20          7015-930                     25                    Power
 2E          7015-950                     41                    Power
 30          7013-520                     20                    Power
 31          7012-320                     20                    Power
 34          7013-52H                     25                    Power
 35          7012-32H                     25                    Power
 37          7012-340                     33                    Power
 38          7012-350                     41                    Power
 41/45       7011-220                     33                    PowerPC
 42          7006-41T/41W                 80                    PowerPC
 43          7008-M20                     33                    Power
 43          7008-M2A                     33                    Power
 46          7011-250                     66                    PowerPC
 47          7011-230                     45                    RSC
 48          7009-C10                     80                    PowerPC
 4C          70XX                     See Note 1                
 57          7012-390                     67                    Power2
 57          7030-3BT                     67                    Power2
 57     9076-SP2 Thin                     67                    Power2
 58          7012-380                     59                    Power2
 58          7030-3AT                     59                    Power2
 59          7012-39H                     67                    Power2
 59     9076-SP2 Thin w/L2                67                    Power2
 5C          7013-560                     50                    Power
 63          7015-970                     50                    Power
 63          7015-97B                     50                    Power
 64          7015-980                    62.5                   Power
 64          7015-98B                    62.5                   Power
 66          7013-580                    62.5                   Power
 67          7013-570                     50                    Power
 67          7015-R10                     50                    Power
 70          7013-590                     66                    Power2
 70     9076-SP2 Wide                     66                    Power2
 71          7013-58H                     55                    Power2
 72          7013-59H                     66                    Power2
 72          7015-R20                     66                    Power2
 72     9076-SP2 Wide                     66                    Power2
 75          7012-370                     62                    Power
 75          7012-375                     62                    Power
 75     9076-SP1 Thin                     62                    Power
 76          7012-360                     50                    Power
 76          7012-365                     50                    Power
 77          7012-350                     41                    Power
 77          7012-355                     41                    Power
 77          7013-55L                    41.6                   Power
 79          7013-591                     77                    Power2
 79     9076-SP2 Wide                     77                    Power2
 80          7015-990                    71.5                   Power2
 81          7015-R24                    71.5                   P2SC
 89          7013-595                    135                    P2SC
 89     9076-SP2 Wide                    135                    P2SC
 90          7009-C20                    120                    PowerPC
 91          7006-42W/42T                120                    PowerPC
 94          7012-397                    160                    P2SC
 94     9076-SP2 Thin                    160                    P2SC
 A0          7013-J30                     75                    PowerPC
 A1          7013-J40                    112                    PowerPC
 A3          7015-R30                 See Note 2                PowerPC
 A4          7015-R40                 See Note 2                PowerPC
 A4          7015-R50                 See Note 2                PowerPC
 A4     9076-SP2 High                 See Note 2                PowerPC
 A6          7012-G30                 See Note 2                PowerPC
 A7          7012-G40                 See Note 2                PowerPC
 C0          7024-E20                 See Note 3                PowerPC
 C0          7024-E30                 See Note 3                PowerPC
 C4          7025-F30                 See Note 3                PowerPC
 F0          7007-N40                     50                    ThinkPad

NOTES:

  1. Systems where uname -m outputs a model ID of 4C:

    In general, the only way to determine the processor speed of a machine with a model ID of 4C is to reboot into System Management Services and choose the system configuration options. However, in some cases the information gained from the uname -M command can be helpful.

     uname -M           Machine Type    Processor Speed    Processor 
    Architecture
    IBM,7017-S70         7017-S70          125                RS64
    IBM,7017-S7A         7017-S7A          262                RD64-II
    IBM,7017-S80         7017-S80          450                RS-III
    IBM,7017-S85         pSeries 680       600                RS64-IV
    IBM,7025-F40         7025-F40          166/233            PowerPC 604e
    IBM,7025-F50         7025-F50          See Note 4         PowerPC 604e
    IBM,7025-F80         7025-F80          See Note 5         RS64-III
    IBM,7025-6F0         pSeries 620       See Note 7         See Note 7
    IBM,7025-6F1         pSeries 620       See Note 7         See Note 7
    IBM,7026-H10         7025-H10          166/233            PowerPC 604e
    IBM,7026-H50         7025-H50          See Note 4         PowerPC 604e
    IBM,7026-H80         7025-H80          See Note 5         RS64-III
    IBM,7026-M80         7026-M80          500                RS64-III
    IBM,7026-B80         pSeries 640       See Note 9         Power3-II
    IBM,7026-H10         7026-H10          166/233            PowerPC
    IBM,7026-H50         7026-H50          See Note 4         PowerPC
    IBM,7026-H70         7026-H70          340                RS64-II
    IBM,7026-H80         7026-H80          450                PowerPC
    IBM,7026-M80         7026-M80          500                PowerPC
    IBM,7026-6H0         pSeries 660       450MHz             RS64 III
    IBM,7026-6H0         pSeries 660       600MHz             RS64 IV
    IBM,7026-6H1         pSeries 660       See Note 7         See Note 7
    IBM,7026-6M1         pSeries 660       See Note 8         See Note 8
    IBM,7028-6C1         pSeries 610       See Note 9         POWER3 II
    IBM,7028-6E1         pSeries 610       See Note 9         POWER3 II
    IBM,7040-681         pSeries 690       1.1 or 1.3GHz      POWER4
    IBM,Model 7042/7043
        (ED)             7043-140          166/200/233/332    PowerPC
    IBM,Model 7042/7043
        (ED)             7043-150          375                PowerPC
    IBM,Model 7042/7043
        (ED)             7043-240          166/233            PowerPC
    IBM,7043-260         7043-260          200                Power3
    IBM,7044-170         7044-170          See Note 6         POWER3 II
    IBM,7044-270         7044-270          375/450            POWER3 II
    IBM,7046-B50         7046-B50          375                PowerPC 604e
    IBM,7248             7248-100          100                PowerPersonal
    IBM,7248             7248-120          120                PowerPersonal
    IBM,7248             7248-132          132                PowerPersonal
    
  2. J-Series, R-Series, and G-Series systems:

    You can determine the processor speed in an MCA SMP system from the FRU number of the CPU card by using the following command:

              lscfg -vl cpucard0 | grep FRU
    

    This will produce the following output:

              FRU Number..................C1D 
     FRU Number    Processor Type    Processor Speed
    E1D           PowerPC 601       75
    C1D           PowerPC 601       75
    C4D           PowerPC 604       112
    E4D           PowerPC 604       112
    X4D           PowerPC 604e      200
    
  3. E-Series and F-30 systems:

    For the E-series and F-30 systems, use the following process to determine CPU speed. Execute:

               lscfg -vp | more
    

    Look for the following stanza:

    procF0                              CPU Card
       Part Number.................093H5280
       EC Level....................00E76527
       Serial Number...............17700008
       FRU Number..................093H2431
       Displayable Message.........CPU Card
       Device Specific.(PL)........
       Device Specific.(ZA)........PS=166,PB=066,PCI=033,NP=001,CL=02,PBH 
    Z=64467000,PM=2.5,L2=1024
       Device Specific.(RM)........10031997 140951 VIC97276
       ROS Level and ID............03071997 135048
    

    In the section Device Specific.(ZA), the section PS= (boldface here) is the processor speed in MHz.

  4. F-50 and H-50 systems and SP Silver Node:

    The following commands can be used to determine the processor speed of an F-50 system. Execute:

              lscfg -vp | more
    

    Look for the following stanza:

    Orca M5 CPU:
      Part Number.................08L1010
      EC Level....................E78405
      Serial Number...............L209034579
      FRU Number..................93H8945
      Manufacture ID..............IBM980
      Version.....................RS6K
      Displayable Message.........OrcaM5 CPU DD1.3
      Product Specific.(ZC).......PS=0013c9eb00,PB=0009e4f580,SB=0004f27 
    ac0,NP=02,PF=461,PV=05,KV=01,CL=1
    

    In the line containing Product Specific.(ZC), the entry PS= (boldface here), is the processor speed in hexadecimal notation. To convert this to an actual speed, use the following conversions: 

    0009E4F580 = 166 MHz
    0013C9EB00 = 332 MHz

    The valuePF= indicates the processor configuration. 

    251 = 1 way 166 MHz
    261 = 2 way 166 MHz
    451 = 1 way 332 MHz
    461 = 2 way 332 MHz

    Each 2 way processor resides on one CPU card. 4 way systems will display two entries for the Orca M5 CPU card.

  5. Only 6-way (F-80) systems run at 500 MHz, all others run at 450 MHz.

  6. Use the L2cache size to determine the speed of the cpu:
         lsattr -El L2cache0
    
    L2cache size  CPU speed
    1mb           333MHz
    4mb           400MHz
    8mb           450MHz
    
  7. It can be configured with 1-, 2-, 4-, or 6-way, RS64 III or RS64 IV, 64-bit processors. Systems configured with the maximum of six processors run at 668 MHz, while other configurations run at 600 MHz (RS64 IV) or 450MHz (RS64 III).

    To determine the number of processors on the system run lsdev -Cc processor and to determine the type of processor run lsattr -El proc0.

  8. The system 7026 Model 6M1 (p660) has two processor slots to accommodate two 2-way or 4-way processor cards to create a system with 2, 4, 6, or 8 processors. Each processor slot can hold one of the following processor cards:

    2-way 750 MHz RS64 IV with 8 MB L2 cache per processor
    4-way 750 MHz RS64 IV with 8 MB L2 cache per processor
    2-way 500 MHz RS64 III with 4 MB L2 cache per processor
  9. To determine the number of processors on the system run lsdev -Cc processor and to determine the type of processor run lsattr -El proc0.

  10. For pSeries servers that use a 350 MHz or 450 MHz processor, run the following command

    lscfg -vp | more 

    Then look for the Processor Card entry. The PF field, in the Product Specific (ZC) line, indicates the processor type as follows:
      PF Value          Card type                                    FRU p/n
      754               375 MHz one way card w/ 4 MB L2 cache        09P0399
      764               375 MHz Two way card w/ 4 MB L2 cache        09P0406
      768               375 MHz Two way card w/ 8 MB L2 cache        09P0143
      7A8               450 MHz Two way card w/ 8 MB L2 cache        09P4478


https://www-304.ibm.com/support/docview.wss?uid=isg3T1000107

728x90
728x90

Question
How many processors exist on an HP-UX system?
 
Answer

When tuning various IBM Informix® products you need to know the number of processors on your system. The NUMCPUVPS or VPCLASS onCONFIG configuration parameter, for instance, should be set to one less than the actual number of physical CPUs present in the server. 

A processor is a device that operates on core. With multiple core technology, this can be a single device or a device that has multiple core "processors". The HP Itanium workstation uses a multiple core device. IBM Informix® products consider these cores as separate physical processors. on HP-UX you can use the ioscancommand to find out how many processors(single or multiple core) are on your system.

On a HP-UX system the ioscan command (located in /usr/sbin) outputs a list of all IO devices. Each line in the output that begins with processor represents a processor that is either a single device or an instance of a multiple core device. 

Use this command line to include the processors in the output and automatically count them using grep and wc. For more information see your Operating System man pages.

    /usr/sbin/ioscan -kf | grep processor | wc -l

    Example 1:

    This example is from a machine with 2 processors.

      $   /usr/sbin/ioscan -kf|grep processor|wc -l
      2
    Example 2:

    This example is from a machine with 4 processors. The Line count (wc -l) is left off to show the actual ioscan output.

      $   /usr/sbin/ioscan -kf|grep processor
      processor   0  120            processor  CLAIMED     PROCESSOR    Processor
      processor   1  121            processor  CLAIMED     PROCESSOR    Processor
      processor   2  122            processor  CLAIMED     PROCESSOR    Processor
      processor   3  123            processor  CLAIMED     PROCESSOR    Processor



https://www-304.ibm.com/support/docview.wss?uid=swg21105416

728x90

'*nix' 카테고리의 다른 글

Determining how many CPUs you have on Solaris UNIX  (0) 2011.11.20
Determining CPU Speed in AIX  (0) 2011.11.20
cpio: 0511-903 Out of phase!  (0) 2011.11.01
Korn Shell Commands  (0) 2011.10.23
dummy file 생성방법  (0) 2011.03.11
728x90

cpio -idmv < *.cpio


cpio: 0511-903 Out of phase!
cpio attempting to continue...

cpio: 0511-904 skipping 732944 bytes to get back in phase!
One or more files lost and the previous file is possibly corrupt!

cpio: 0511-027 The file name length does not match the expected value.


cpio -idcmv < *.cpio



728x90

'*nix' 카테고리의 다른 글

Determining CPU Speed in AIX  (0) 2011.11.20
Determining how many CPUs you have on HP-UX  (0) 2011.11.20
Korn Shell Commands  (0) 2011.10.23
dummy file 생성방법  (0) 2011.03.11
디스크 사용량 확인  (0) 2011.03.11
728x90

Korn shell

The Korn shell is a command interpreter that allows an end user to type in commands to communicate to the AIX system. By default, when a user logins, a shell process is started The default AIX shell is /usr/bin/ksh.

A '-' is prefixed to the name of the ksh program to indicate that this shell initially read the contents of the files/etc/environment/etc/profile, and $HOME/.profile.

  • /etc/environment specifies the basic environment for all processes
  • /etc/profile specifies variables to be added to the environment by the shell
  • $HOME/.profile specifies variables specific to user to be added to the environment by the shell

Other available shells are...

  • /bin/bsh the Bourne shell
  • /bin/csh the C-shell
  • /bin/sh the Standard shell

$HOME/.hushlogin

If the ./hushlogin file exists, it will suppress the displaying of the /etc/motd file (message of the day file) and the message for unsuccessful login attempts for that user account.


$HOME/.profile

The .profile file is used to personalize a user's account and/or sets the environment the user will operate under. The following table represents some examples of settings that can be set in the .profile file.

VariablesWhat it does
PRINTER=mylaserControls default printer. When you use the lp command with no additional flags to specify which queue to print to, by default it will go to the printer queue named after the equal sign.
TMOUT=3600Will cause an automatic log off after 60 minutes (3600 seconds) if no keyboard activity encountered or no output is generated to the display after the timeout period has expired. There is a 60 second pause before the ksh is exited.
ESCDELAY=1000Controls the amount of time permitted between the ESCape character and any other components of an ESCape sequence. The AIX Extended Curses library has a built-in timeout which sets the maximum amount of time permissible between the receipt of the ESC character and the second character of the escape sequence.
set -o noclobberWon't allow you to overwrite a file with the redirection symbol (eg.,cat junk > goodstuff).

To overwrite the noclobber option when noclobber is enabled, type'>|' when redirecting output (eg., cat smit.log >| smit.bck).

set -o ignoreeofDisables ^D to logout; you must type exit to exit the shell
set -o viEnable command line editing/playback using vi commands
stty -olcuc -iuclc -xcase-olcuc maps lower case to upper case on output.
-iuclc=maps upper case to lower case on input.
-xcase 
won't allow you to login unless in lower case.


alias, unalias

Assign a name or an abbreviated name that makes sense or is shorter for a command.

ExamplesWhat it does
aliasLists the aliases that are currently defined.
alias "dir=ls"Creates an alias. dir will output the same contents as the lscommand.
unalias nameRemoves an alias. unalias dir


exec

Executes the command line directly without creating a new process (PID) (current shell is overlaid with command specified on the command line). When the command has finished or is terminated, control is returned to the init process, thereby logging off the user. Typically you will see this command used as the last entry in the $HOME/.profile.

ExamplesWhat it does
exec /usr/bin/smitWill execute the System Management Interface Tool (SMIT) program - overlaying the current shell program
Changing standard input (stdin)
exec <FileNameForInputReassigns standard input from the keyboard to a file
exec </dev/ttyReassigns standard input back to the keyboard
exec <&-Closes standard input
exec </dev/nullAssociate standard input to null device
Changing standard output (stdout)
exec >WriteToFileNameReassigns standard output from your terminal display to a file
exec >/dev/ttyReassigns stardard output back to your terminal
exec >&-Closes standard output
exec >/dev/nullAssociate standard output to null device


$HOME/.sh_history

Contains the history of user commands executed on the command line for each login session.


history

List the last 16 commands executed from the command line. (Uses .sh_history)

ExamplesWhat it does
history ! 310
Re-executes the item labled 310 in the .sh_history file
-25List the last 25 commands executed from the command line. Default number of commands listed is 16.
r viRe-executes the latest 'vi' session stored in the .sh_history file


kill

Sends a signal to a running process to inform it to do something. Typically you use the signal KILL to terminate or suspend a process.

ExamplesWhat it does
kill -9 5344Will terminate the process with a process id (PID) of 5344. A signal value of -9 means that the signal can't be caught by the application but is intercepted by AIX to terminate the process in question.
kill -lLists valid signals to use with the kill command.
kill -Easy way to terminate all processes running in the system EXCEPT your current shell and the /etc/init process.
kill -STOP 3901Suspends the PID 3901. Execute the ps -elf|grep 3901 command and the status field (marked 'S') will have a 'T', meaning the process is suspended..
kill -CONT 3901Resumes the suspended process whose PID is 3901


process control

Pressing ^Z will suspend a process. To unsuspend a process, use the fg command to bring that process to the foreground again or to leave the process running in the background.

ExamplesWhat it does
^ZWill suspend the current PID. Example output: [1] + 8193 Stopped
jobs -lList all current jobs suspended
fg 3934Will bring suspended job PID 3934 to the foreground. If only one command is listed when jobs -l is executed, you only need to type fgto bring the only suspended process back to the foreground.
bg 4011Will run the suspended job with a PID of 4011 in the background now


set, unset

Set positional parameters for the current shell.

ExamplesWhat it does
set `date`; echo $1 $2 $3 $4 $5 $6Thu Nov 14 20:12:47 CST 2002
echo $6Displays the year - 2002
set -oDisplays current settings for the set command.
set -o noclobber 
set +o noclobber
Won't allow a user to overwrite a file with the same file name. Use -oto turn on or +o to turn off
set -o vi
set +o vi
Enable users to use 'vi' commands to manipulate command line entry. Use -o to turn on or +o to turn off
set o xtrace
set +o xtrace
Displays commands and their arguments as they are executed.Normally, you would place the 'set -x' command at the beginning of a script file.
unset ENVUsed to undefine a system variable. Removes the system variable ENV from your user environment



http://www.ahinc.com/aix/kornsh.htm


728x90

'*nix' 카테고리의 다른 글

Determining how many CPUs you have on HP-UX  (0) 2011.11.20
cpio: 0511-903 Out of phase!  (0) 2011.11.01
dummy file 생성방법  (0) 2011.03.11
디스크 사용량 확인  (0) 2011.03.11
[linux] 메모리 상태 체크 (free)  (0) 2011.03.11
728x90

dd if=/dev/zero of=test.bin bs=100000000 count=1

728x90

'*nix' 카테고리의 다른 글

cpio: 0511-903 Out of phase!  (0) 2011.11.01
Korn Shell Commands  (0) 2011.10.23
디스크 사용량 확인  (0) 2011.03.11
[linux] 메모리 상태 체크 (free)  (0) 2011.03.11
[AIX] errpt 시 보여지는 hdisk에러 문의  (0) 2011.03.11
728x90

■ 파일시스템에 대하여
1) 유닉스는 모든 것이 파일로 구성되어 있다고 해도 과언이 아닙니다. 심지어 프로세스,메모리 등의 장치도
/dev/proc1 등의 파일로 보입니다.
2) 파일시스템은 디스크를 분할하여 사용하는 단위입니다. 마치 DOS나 윈도에서 c:, d:를 나누어 놓고 사용하듯이
논리적으로 디스크를 분할해 놓은 것으로 봐도 될 듯 합니다.
3) /home라는 파일시스템이 있더라도 그 하위에 /home/data 라는이름으로 파일시스템을 마운트할 수 있습니다.
그리고 각각은  서로 독립적입니다.
4) 내가 어떤파일을 /home/acecms/somefile.dat 만들었는데 이파일의 크기가 무쟈게 크답니다. 그래서 /home라는
파일시스템을 꽉 채웠다면 어떻게 될까요? 그 상위인 /(루트)를 쓸까요? 아님 /tmp (템프)를 쓸까요?
■ 파일시스템의 마운트상태와 사용량 알아보기 df
1) 파일시스템이 생성만 되고 마운트되지 않으면 사용할 수 없습니다. 마운트와 사용량을 보는 명령어는 df 입니다.
$ df -k 이렇게 하면 현재 마운트된 파일시스템과 그 사용량을 알 수 있습니다. (-k는 kilobyte로 보자는 옵션)
(결과)
파일시스템           K바이트    사용    가용   용량    설치지점
/dev/dsk/c0t0d0s0    4129940 3403813  684828    84%    /
swap                 2719896       0 2719896     0%    /tmp
/dev/dsk/c0t0d0s4    4129940  355938 3732703     9%    /home
/dev/dsk/c0t1d0s0    5162118 2616614 2493883    52%    /oracle/app/oracle
■ 디렉토리별 사용량 알아보기 du (disk usage)
1) 하위 디렉토리의 사용량까지 합산하여 볼 수 있는 명령어 입니다.
$ du -ks 는 현재디렉토리 이하의 모든 파일의 크기를 합산하여 k단위로 나타내 줍니다. (결과는 한줄)
$ du -ks * 이렇게 하면 현재디렉토리와 그 이하의 합산읍 보여 줍니다. (결과갯수는 ls -l 과 동일, 값은 다름)
2) 이것은 마치 윈도에서 디렉토리별 속성을 보면 사용량을 보여주듯 아주 유용하게 사용 할 수 있습니다
■ 사용예
1) 첫번째 ■ 의 4)번에 대한 해답은 파일시스템 풀로 파일을 생성하던 작업이 죽어버릴 겁니다. 즉, 결코 다른
파일시스템에 쓰지 않습니다. 파일시스템 풀은 작업자에게 아주 곤란을 발생시킵니다. 그래서 시스템관리자나
사용자는 수시로 파일시스템의 상태를 체크해야만 합니다.
2) 어느날 보니 특정 파일시스템이 100% 풀상태입니다. 어떻게 할까요? (여기서는 /home 이라고 하자구요)
$ df -k 해서 상태를 확인하고 full인 디렉토리로 옮겨간후
$ cd /home 거기서  $ du -ks * 이렇게 치면
3162    acecms
351511  acekhs
7       acemmh
3       acepch
1       aceyjk
1181    dev
위와같이 나타납니다. 이 중에서 가장 많이 쓰고있는 디렉토리 acekhs를 찾고 거기서 또 $ du -ks *
이렇게 해서 추적해 나가면서 필요없는 파일을 지워주면 됩니다.
(주의 : 파일명이 .(dot)으로 시작하는 파일은 추적하지 않는다)

728x90

'*nix' 카테고리의 다른 글

Korn Shell Commands  (0) 2011.10.23
dummy file 생성방법  (0) 2011.03.11
[linux] 메모리 상태 체크 (free)  (0) 2011.03.11
[AIX] errpt 시 보여지는 hdisk에러 문의  (0) 2011.03.11
[AIX] errpt 시스템 에러로그 - dump  (0) 2011.03.11

+ Recent posts