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
Check "Real memory" on pa-risc and Ia64
Tusc - Process trace "Debug mode"
- 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>
Labels: tusc
How to mount a windows share on HP-UX
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.
Labels: CIFS (samba)
Forwarding the syslog to another server on network
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
Labels: Security
Wrapper - Block the root password change
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.
Labels: Security
Renaming a logical volume
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
Labels: Filesystem, LVM
Serviceguard - how to change package IP on line/ off line
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.
Labels: MC ServiceGuard, Network