Tag Archives: comando

Aix, Solaris e Linux: Como identificar o MAC address da placa de rede

Para verificar o MAC address da placa de rede no AIX, Solaris e Linux:

Aix:

Comando lscfg, veja o “Network address”:

# lscfg -vl ent1
  DEVICE            LOCATION          DESCRIPTION

  ent1              60-58             Gigabit Ethernet-SX PCI Adapter
                                      (14100401)

        Network Address.............0004AC7CE7BC
        Displayable Message.........Gigabit Ethernet-SX PCI Adapter
                                    (14100401)
        EC Level....................E77671
        Part Number.................41L6596
        FRU Number..................07L8276
        Device Specific.(YL)........U0.2-P1-I1/E1

Solaris:

Comando ifconfig, veja o “ether”:

# ifconfig -a
le0: flags=863 mtu 1500
        inet 131.225.80.209 netmask fffff800 broadcast 131.225.87.255
        ether 8:0:20:10:d2:ae

Linux:

Comando ifconfig, veja o “HWaddr”:

# ifconfig -a
eth0      Link encap:Ethernet  HWaddr 00:60:08:C4:99:AA
          inet addr:131.225.84.67  Bcast:131.225.87.255  Mask:255.255.248.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:15647904 errors:0 dropped:0 overruns:0
          TX packets:69559 errors:0 dropped:0 overruns:0
          Interrupt:10 Base address:0x300

Referência:

  1. How to find your mac address
  2. AIX – lscfg command reference
  3. Solaris – ifconfig command man page
  4. Linux – ifconfig man page

Aix – Como ver o histórico de instalação de um pacote (fileset)

No sistema operacional AIX, para ver o histórico de instalação de um pacote (fileset) utiliza-se o comando lslpp com a opção -h:

No exemplo abaixo, o histórico de instalação de um dos pacotes do DB2:

# lslpp -h db2_08_01.cj
  Fileset         Level     Action       Status       Date         Time
  ----------------------------------------------------------------------------
Path: /usr/lib/objrepos
  db2_08_01.cj
                 8.1.1.80   COMMIT       COMPLETE     06/15/08     10:46:23
                8.1.1.128   COMMIT       COMPLETE     06/24/09     15:48:40
                8.1.1.152   COMMIT       COMPLETE     10/21/09     12:30:59
                8.1.1.160   APPLY        COMPLETE     01/17/10     16:40:11

Referência:

  1. Man page do comando lslpp (Para AIX V 5.3): http://publib.boulder.ibm.com/infocenter/pseries/v5r3/index.jsp?topic=/com.ibm.aix.cmds/doc/aixcmds3/lslpp.htm

Listando o espaço livre de um VG (Volume Manager Aix e Veritas)

Para verificar espaço em disco livre num volume group, execute os seguintes comandos, para Veritas e Aix respectivamente:

Veritas:

# vxdg -g bootdg free
DISK         DEVICE       TAG          OFFSET    LENGTH  FLAGS
rootdg01     c0t0d0s2     c0t0d0       18837360 51408000  -

O valor de LENGTH está em blocos de 512-bytes e representa o espaço livre no DG(VG) bootdg.

Aix:

# lsvg rootvg
VOLUME GROUP:   rootvg                   VG IDENTIFIER:  00011824bd4eef54
VG STATE:       active                   PP SIZE:        16 megabyte(s)
VG PERMISSION:  read/write               TOTAL PPs:      1084 (17344 megabytes)
MAX LVs:        256                      FREE PPs:       376 (6016 megabytes)
LVs:            20                       USED PPs:       708 (11328 megabytes)
OPEN LVs:       17                       QUORUM:         2
TOTAL PVs:      2                        VG DESCRIPTORS: 3
STALE PVs:      0                        STALE PPs:      0
ACTIVE PVs:     2                        AUTO ON:        yes
MAX PPs per PV: 1016                     MAX PVs:        32

No comando acima em FREE PPs está listado o espaço livre no VG em número de PPs e megabytes.

Referência:

Aix – Usuários default de sistema

As informações a seguir foram escritas num Forum do “LinusQuestions.org” pelo usuário “Harry Seldon“.

Achei um resumo útil e decidi salvar aqui neste bloco de notas.

Fonte: http://www.linuxquestions.org/questions/aix-43/aix-default-user-list-612651/

“I work at a company that gets audited all the time. The ones we’re most commonly asked to remove are guest, lpd, uucp, nuucp (if it’s there) and imnadmin. Here’s a list of accounts I put together about a year ago; most of it is relevant, I think:

daemon – The daemon user account exists only to own and run system server processes and their associated files. This account guarantees that such processes run with the appropriate file access permissions.

bin – The bin user account typically owns the executable files for most user commands. This account’s primary purpose is to help distribute the ownership of important system directories and files so that everything is not owned solely by the root and sys user accounts.

sys – The sys user owns the default mounting point for the Distributed File Service (DFS) cache, which must exist before you can install or configure DFS on a client.

adm – The adm user account owns the following basic system functions:
* Diagnostics, the tools for which are stored in the /usr/sbin/perf/diag_tool directory.
* Accounting, the tools for which are stored in the following directories:
o /usr/sbin/acct
o /usr/lib/acct
o /var/adm
o /var/adm/acct/fiscal
o /var/adm/acct/nite
o /var/adm/acct/sum

uucp – Owner of hidden files used by uucp protocol. The uucp user account is used for the UNIX-to-UNIX Copy Program, which is a group of commands, programs, and files, present on most AIX systems, that allows the user to communicate with another AIX system over a dedicated line or a telephone line.

guest – Allows access to users who do not have access to accounts.

nobody – The nobody user account is used by the Network File System (NFS) to enable remote printing. This account exists so that a program can permit temporary root access to root users

lpd – Owner of files used by printing subsystem. This account has been disabled.

imnadm – IMN search engine used for Documentation Library Search.

lp – Possibly something to do with printing.

invscout – Surveys the host system for currently installed microcode or Vital Product Data (VPD).

snapp – The account that manages Snapp, an extensible, XML-based application that provides a menu-driven interface for UNIX system administration tasks on a handheld PDA.

sshd – The user account for managing the sshd service.”

Solaris – Como checar pacotes pacialmente instalados

Para checar se há pacotes parcialmente instalados, você deve executar o comando pkginfo com a opção “-p”.

O sistema irá mostrar os pacotes parcialmente instalados. Caso a saída do comando não retorne nada é porque a instalação de todos os seus pacotes está ok.

# pkginfo -p

English version:

Solaris – How to check partially installed packages

To check if a Solaris package is partially installed, you should run the command pkginfo, with the option “-p”.

The system will show only the packages that are partially installed. If there is no partially installed package, nothing will be showed.

# pkginfo -p

Aix e Solaris – Como criar um arquivo de um tamanho específico

Abaixo, seguem os comandos utilizados em AIX e Solaris para criar um arquivo de um tamanho específico. A criação de um arquivo com um determinado tamanho é útil para algumas coisas como:

  • criar-se arquivos para testes, por exemplo, para transferir o arquivo via rede e avaliar a taxa de transferência da rede.
  • criar arquivos para serem usados como swap no Solaris.

 

AIX:

Comando lmktemp:

# /usr/sbin/lmktemp [nome do arquivo] [tamanho]

Exemplo:

# /usr/sbin/lmktemp teste.txt 100m

 

Solaris:

Comando mkfile:

# mkfile  [tamanho] [nome do arquivo]

Exemplo:

# mkfile 100m teste.txt

 

O tamanho deve vir seguido de g, m, k ou b (giga, mega, kilo, byte)

Nos dois exemplos acima, um arquivo chamado teste.txt é criado com 100 MB.

 

Referência:

  1. Unix Rosetta Stone: http://vinhnet.org/Knowledge/system-admin/Rosetta_Stone_Unix_translator2.htm
  2. mkfile man page: http://docs.sun.com/app/docs/doc/802-5747-1M/6i9g1e17p?l=en&a=view&q=mkfile
  3. lmktemp: http://www.coolcommands.com/index.php?option=com_cccat&task=display&id=154