Physical memory in AIX
Posted by Lincoln Zuljewic Silva in Aix on February 18th, 2010
To check the amount of physical RAM that a AIX Server has, you can use the following commands:
| lsattr -El sys0 | grep realmem realmem 16121856 Amount of usable physical memory in Kbytes |
or
| lsattr -El mem0 goodsize 15744 Amount of usable physical memory in Mbytes False size 15744 Total amount of physical memory in Mbytes False |
or
| prtconf|grep "Memory Size" Memory Size: 15744 MB Good Memory Size: 15744 MB |
Glance shortcuts
Posted by Lincoln Zuljewic Silva in HP-UX on February 4th, 2010
To use the buttons at the bottom of the glance, you should do an "export TERM=dtterm".
After that, you will be able to use:
F1 for ProcList
F2 for CPU Rpt
F3 for Mem Rpt
F4 for Disk Rpt
F5 for NextKeys
F6 for SlctProc
F7 for Help
F8 for Exit
Control agent problem (OVO)
Posted by Lincoln Zuljewic Silva in HP-UX on January 8th, 2010
Sometimes the OVO agent stops communicating with the OVO Server.
Control agent on nodeHOST isn't accessible. (OpC40-405) Network communication problem: Could not obtain endpoint information from node ncadg_ip_udp:10.0.0.10[]. (OpC40-399) |
To reestablish the communication, you should restart it:
To stop, use the command:
/opt/OV/bin/OpC/opcagt -stop |
Check if it is stopped:
/opt/OV/bin/OpC/opcagt -status |
Attention: the "Control Agent" may not stop, you can kill it with a "kill -9 PID"
To start, use the command:
/opt/OV/bin/OpC/opcagt -start |
Check powerpath links in HP-UX
Posted by Lincoln Zuljewic Silva in HP-UX on December 22nd, 2009
To check if the powerpath links are up in HP-UX, you can use the following command:
| powermt display dev=all |
When Glance stop working
Posted by Lincoln Zuljewic Silva in HP-UX on December 6th, 2009
Sometimes glance (performance monitor for HP-UX) can crash (before crash, it will return 0% of CPU, Disk and networking) working with the following error:
| GlancePlus fatal error. == Fatal Nums Error == C.04.50.57 02/10/07 == User: root/6pts/6(/dev/pts/6) Date: Sun Dec 6 15:52:12 File: /crm/numsVob/hp/11.0/nums.C Line: 485 Product id: Glance System: server B.11.11 9000/800 Errno: 0 (Error 0) Connection to midaemon lost — check midaemon process and status.mi == End of Error Msg ============================= |
To solve it, you should:
Stop MWA:
| mwa stop |
Remove all files (including the hidden ones) from /var/opt/perf/datafiles:
| rm -rf /var/opt/perf/datafiles/* rm -rf /var/opt/perf/datafiles/.* |
Check if midaemon and ttd are stopped:
| mwa status |
If midaemon and ttd didn’t stop, force stops them with the command kill (the PID was returned by the command ‘mwa status’).
Now, start MWA again:
| mwa start |
Disable file size limit in AIX
Posted by Lincoln Zuljewic Silva in Aix on December 4th, 2009
By default, if you try do copy/create a file larger than 2Gb in AIX, you will get a “file too large” message. That happen because AIX have a default limit of 2Gb for files.
To disable (or increase) this limit, edit /etc/security/limits and change the parameter fsize to “-1” or whatever value you want.
You can change it in “default” to apply to all users or change it to a specific user.
Remember that the file system should be JFS2.
Working with “SVC”
Posted by Lincoln Zuljewic Silva in Solaris on December 2nd, 2009
Follow useful commands to work with “SVC” in Solaris:
More option can be found at “man svcadm”
| svcs -a -> list all installed services. svcadm disable SERVICE -> disable a service. if you use “svcadm disable -t SERVICE”, the service will be disabled only until the next reboot. You can use this commando to stop a service. svcadm enable SERVICE -> enable a service. If you use “svcadm enable -t SERVICE”, the service will not be enabled automatically on reboot. svcadm restart SERVICE -> restart a service. svcadm reload SERVICE -> reload the configuration file. |
More options can be found at “man svcadm”
Creating an user on AIX
Posted by Lincoln Zuljewic Silva in Aix on December 1st, 2009
Creating an user on AIX
On AIX, you can use the following commands to create an user
| mkuser pgrp=’primary group’ groups=’other groups’ home=’home directory’ shell=’/usr/bin/ksh’ gecos=’GECOS’ USERNAME |
Forcing an user changing the password on AIX
Posted by Lincoln Zuljewic Silva in Aix on November 30th, 2009
Forcing an user changing the password on AIX
On AIX, you can use the following commands to unlock na user and force it to change it’s password on first logon:
| pwdadm -f ADMCHG USER |
Lock an user account in HP-UX
Posted by Lincoln Zuljewic Silva in HP-UX on September 24th, 2009
To lock an user account in HP-UX, you can use the following command:
| /usr/lbin/modprpw -m alock=YES USER |
Martian Friend
Posted by Lincoln Zuljewic Silva in Linux on September 15th, 2009
You may find some weird messages indications in your syslog telling you something like “martian source” like the followings:
When a host needs send a package to another host, it can define the route on the network or use the default route. Those “source routed packages” are identified in Linux as martian packages. You can configure your Linux log/do not log those packages:
| echo 0 > /proc/sys/net/ipv4/conf/*/log_martians #do not log |
Merge many depots
Posted by Lincoln Zuljewic Silva in HP-UX on August 25th, 2009
When you have many depot files, you can create a single big depot and install it instead of install one by one.
Let’s assume that you need install the following depots, and they are all located in the directory /tmp/install/depots:
| autoconf-2.64-hppa-11.11.depot bison-2.4.1-hppa-11.11.depot gawk-3.1.7-hppa-11.11.depot sed-4.2.1-hppa-11.11.depot tcltk-8.5.7-hppa-11.11.depot texinfo-4.13-hppa-11.11.depot zip-3.0-hppa-11.11.depot |
To create a single depot, run the follow commands:
| cd /tmp/install/ for i in `ls depots/*.depot` ;do swcopy -s /tmp/install/$i \* @/tmp/install/big;done |
Now, to install it, you can use:
| swinstall -s /tmp/install/big |
Solaris and NRPE
Posted by Lincoln Zuljewic Silva in Solaris on August 19th, 2009
A very nice guide to install NRPE and nagios-plugins on Solaris 10 can be found here.
To stop/start the NRPE, you can use the following command:
svcadm disable svc:/network/nrpe/tcp svcadm enable svc:/network/nrpe/tcp
If you keep getting the “CHECK_NRPE: Error – Could not complete SSL handshake.” message, see this FAQ comment
Resizing lvol in Red Hat AS 4
Posted by Lincoln Zuljewic Silva in Linux on August 18th, 2009
As incredible as it seems, RHAS4 doesn’t came with the resize2fs command (just like the others RH distributions). After some research, I found the tool that replace the resize2fs command and it’s the ext2online, for example:
| ext2online /dev/mapper/VG00-vl02 |
name/address mismatch
Posted by Lincoln Zuljewic Silva in Solaris on July 16th, 2009
You may get in the messages log the follow error when trying access a FTP server on Solaris:
| Jul 16 16:19:13 SolarisServer in.ftpd[1940]: [ID 913506 daemon.warning] refused connect from 172.152.121.114 (name/address mismatch) |
This happends because the server cannot resolve your IP address. To solve it, you need disable TCP_WRAPPERS checks for in.ftpd by using this command:
| inetadm -m svc:/network/ftp:default tcp_wrappers=FALSE |
After that, you will be able to do FTP again
rlogin access denied
Posted by Lincoln Zuljewic Silva in Linux on June 15th, 2009
In some specific situations, you need use rlogin to remote access a server, but you can face the following error:
|
clientServer:~ # rlogin rloginServer Password: Password: Login incorrect
login: root Password: Login incorrect
login: root Password: Login incorrect
login: root Password:
Login incorrect rlogin: connection closed. |
If you check the /var/log/secure log on the “rloginServer”, you will find the following messages:
|
Jun 15 10:44:41 rloginServer rlogind[16640]: pam_securetty(rlogin:auth): access denied: tty ‘rlogin’ is not secure ! Jun 15 10:44:41 rloginServer rlogind[16640]: pam_rhosts_auth(rlogin:auth): denied to root@10.11.4.9 as root: access not allowed Jun 15 10:44:47 rloginServer login: pam_securetty(remote:auth): access denied: tty ‘pts/0′ is not secure ! Jun 15 10:44:51 rloginServer login: FAILED LOGIN 1 FROM 10.11.4.9 FOR root, Authentication failure Jun 15 10:44:53 rloginServer login: pam_securetty(remote:auth): access denied: tty ‘pts/0′ is not secure ! Jun 15 10:44:58 rloginServer login: FAILED LOGIN 2 FROM 10.11.4.9 FOR root, Authentication failure Jun 15 10:44:58 rloginServer login: pam_unix(remote:auth): bad username [] Jun 15 10:44:58 rloginServer login: pam_succeed_if(remote:auth): error retrieving information about user Jun 15 10:44:58 rloginServer login: FAILED LOGIN 3 FROM 10.11.4.9 FOR , User not known to the underlying authentication module Jun 15 10:44:59 rloginServer login: pam_unix(remote:auth): bad username [] Jun 15 10:44:59 rloginServer login: pam_succeed_if(remote:auth): error retrieving information about user Jun 15 10:44:59 rloginServer login: FAILED LOGIN SESSION FROM 10.11.4.9 FOR , User not known to the underlying authentication module
|
The problem here, is that “rlogin” is not a “secure” shell. To configure it, you should add “rlogin” (without the quotes) to /etc/securetty .
After that, you will be able to access the rlogin server.
Forcing an user changing the password on Solaris
Posted by Lincoln Zuljewic Silva in Solaris on June 8th, 2009
On Solaris, you can use the following commands to unlock na user and force it to change it’s password on first logon:
|
passwd -f <username> passwd: password information changed for <USER> |
HP-UX password maintenance
Posted by Lincoln Zuljewic Silva in HP-UX on June 1st, 2009
Follow a few utilities to maintain the user’s passwords:
/usr/lbin/getprpw <username>- display protected password database
/usr/lbin/modprpw –x <username> – change password
/usr/lbin/modprpw –k <username> – unlock the user
Setting session timeout on Linux
Posted by Lincoln Zuljewic Silva in Linux on May 27th, 2009
To set an automatically shell timeout on Linux (that Will logoff that session after X seconds), you just need setup the following variable (put it in your /etc/profile):
|
echo “TMOUT=300; readonly TMOUT; export TMOUT” >> /etc/profile |
The “readonly” option will not allow an normal user change (ou unset) it.
Hardware specification in HP-UX
Posted by Lincoln Zuljewic Silva in HP-UX on May 26th, 2009
You can use the following command to check the HP-UP hardware (like CPU and memory):
|
hpuxhost@root:/root # print_manifest |more
System Information
Your Hewlett-Packard computer has software installed and configured as follows.
The system was created July 04, 2007, 11:53:28 EDT. It was created with Ignite-UX revision C.6.10.97.
————————————————————- NOTE: You should retain this information for future reference. ————————————————————-
System Hardware
Model: 9000/800/SD32A Main Memory: 65005 MB Processors: 32 Proccesor(0) Speed: 1000 MHz Proccesor(1) Speed: 1000 MHz Proccesor(2) Speed: 1000 MHz Proccesor(3) Speed: 1000 MHz Proccesor(4) Speed: 1000 MHz Proccesor(5) Speed: 1000 MHz Proccesor(6) Speed: 1000 MHz Proccesor(7) Speed: 1000 MHz Proccesor(8) Speed: 1000 MHz Proccesor(9) Speed: 1000 MHz Proccesor(10) Speed: 1000 MHz Proccesor(11) Speed: 1000 MHz Proccesor(12) Speed: 1000 MHz Proccesor(13) Speed: 1000 MHz Proccesor(14) Speed: 1000 MHz Proccesor(15) Speed: 1000 MHz Proccesor(16) Speed: 1000 MHz Proccesor(17) Speed: 1000 MHz Proccesor(18) Speed: 1000 MHz Proccesor(19) Speed: 1000 MHz Proccesor(20) Speed: 1000 MHz Proccesor(21) Speed: 1000 MHz Proccesor(22) Speed: 1000 MHz Proccesor(23) Speed: 1000 MHz Proccesor(24) Speed: 1000 MHz Proccesor(25) Speed: 1000 MHz Proccesor(26) Speed: 1000 MHz Proccesor(27) Speed: 1000 MHz Proccesor(28) Speed: 1000 MHz Proccesor(29) Speed: 1000 MHz Proccesor(30) Speed: 1000 MHz Proccesor(31) Speed: 1000 MHz (…) Many other HW information above |
