Check "Real memory" on pa-risc and Ia64

quarta-feira, 23 de janeiro de 2013

I'm listing just one way to check the memory on server but as usual there are many ways to do that.

PA-RISC

# getconf REAL_MEMORY HPUX

ITANIUM

# machinfo | grep -i memory

or

# dmesg | grep mem

Tusc - Process trace "Debug mode"

domingo, 13 de janeiro de 2013

- Why this process is running and is taking so much time???!??!

I am sure someday this question will pass for your mind, in order to try find out what is going on we have the possibility to install a software called "tusc" on HP-UX, a similar command in AIX is the truss (it's native on OS). The output can be not so friendly...

Follow an example using tusc to trace the system calls and signal.

# /usr/local/bin/tusc -apf <pid>

How to mount a windows share on HP-UX

sexta-feira, 4 de janeiro de 2013

After some time away... here is a new post :-)
and by the way... Happy New Year!!

Requirements:

- User account on Windows box
- Root access on HP-UX box
- cifs patch installed on HP-UX
- Network communication between them (client and server)
- Directory shared on Windows

Check if cifs is running:
# cifsclient status

If it is not running..
# cifsclient start

Create a directory to be used for your mount point and use the bellow command to mount:
# cifsmount //WINDOWSserverHostname/DirectoryShared /YourMountpoint -U username

Check the man pages for more flags to be used with cifsmount command.

Forwarding the syslog to another server on network

quinta-feira, 25 de outubro de 2012

I'm using a linux to receive my logs for this explanation.

LogServer:
usually the syslog conf path for syslog on linux is /etc/sysconfig/syslog (red hat for example)
Setup the syslog on linux with the bellow options:

SYSLOGD_OPTIONS="-m 0 -r"
*.* /var/adm/messages

Refresh the syslog
# kill -HUP syslogPid

HP-UX :
Setup the syslog on HP-UX with the bellow options:
syslog conf path: /etc/syslog.conf
*.debug @LogServer

Get the syslog pid to refresh the process:
ps -ef | grep syslog

# kill -HUP syslogPid

Wrapper - Block the root password change

sábado, 20 de outubro de 2012

For security reason is good dont give the "power" to change the root password for everyone :-)

Create a list of users that you want to deny the change of password.:
# vi /usr/local/etc/passwd_not_allowed
root

bin

Now create the wrapper:
# vi /tmp/passwd
file=/usr/local/etc/passwd_not_allowed
user=$1
grep -q ${user] ${file} && echo "${user} - You don't have access to change this passwd"  && exit
/usr/bin/passwd.dist ${User}


Set the right permissions:
# chmod 755 /tmp/passwd

Move the real passwd for another place:
# mv /usr/bin/passwd /usr/bin/passwd.dist

Put your wrapper in the place of passwd:
# mv /tmp/passwd /usr/bin/

Now you can configure a sudo for this script, if you don't want move the passwd bin you can create the wrapper in another place.

Renaming a logical volume

segunda-feira, 1 de outubro de 2012

old name: /dev/vgwow/lvol1
new name: /dev/vgwow/data_lv

# umount /dev/vgwow/lvol1
# ll  /dev/vgwow/lvol1                                      take note of the minor ( e.g 0x010001 )
brw-r-----   1 root       root        64 0x010001 Dec 31 17:59 lvol1
#       create new logical volume name
# mknod  /dev/vgwow/rdata_lv c 64 0x010001
# vi /etc/fstab                                               ( reflect the new logical volume  )
# mount -a

# rmsf /dev/vgwow/lvol1
# rmsf /dev/vgwow/rlvol1

Serviceguard - how to change package IP on line/ off line

domingo, 29 de julho de 2012

Change package IP address off line

Halt the package
# cmhaltpkg -v <package>

Update control files
/etc/cmcluster/package/package.conf

Propagate the changes manually or use cmapplyconf
(legacy or modular)

Start package
# cmrunpck <package>

Check that the IP was added.
# cmviewcl -v

Change package IP address on line

You can change the IP address while a package is up but there's some risky... but can be done.
The recommended is do it off line to avoid any problems.

Use the command cmmodnet to remove the IP addres and after to add.

Using netstat -in check that the ip address is correct.

Check the cluster status:
# cmviewcl -v

Update the package script, propagate the change to other nodes.

For more infos about cmmodnet check man pages.