- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Submit you HP-Ux tips and tricks and win easy ...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-15-2002 12:24 PM
тАО01-15-2002 12:24 PM
Re: Submit you HP-Ux tips and tricks and win easy 10points
YESTERDAY=$(TZ=$(date +%Z)+24; date '+%b %e')
This has been very usefull for me with backups.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-15-2002 05:48 PM
тАО01-15-2002 05:48 PM
Re: Submit you HP-Ux tips and tricks and win easy 10points
#find /ctx/sap/interface/cnzl -mtime +15 -exec mv {} /temp
A good command to copy a file system to a new directory.
#cd /sourc_dir
#find . -depth -print|cpio -pdmv /dest_dir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-15-2002 06:09 PM
тАО01-15-2002 06:09 PM
Re: Submit you HP-Ux tips and tricks and win easy 10points
and been mirroring new systems disks.
# pvcreate -B /dev/rdsk/c2t6d0
# vgextend /dev/vg00 /dev/dsk/c2t6d0
# mkboot /dev/rdsk/c2t6t0
# mkboot -a "hpux -lq(;0)/stand/vmunix" /dev/rdsk/c2t6d0
# lvlnboot -R
# for LVOL in /dev/vg00/lv*
> do
> echo $LVOL
> lvextend -m 1 $LVOL
> done
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-15-2002 06:22 PM
тАО01-15-2002 06:22 PM
Re: Submit you HP-Ux tips and tricks and win easy 10points
Tip 2 - In cluster environment, before shutdown any node, disable all packages switching, halt node and shutdown the node.
Tip 3 - If adding or removing disks from SC10, remember to shutdown all machines which connected to the SC10 and also shutdown the SC10 before removing or adding disks.
Good luck.
Kenny.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-15-2002 06:27 PM
тАО01-15-2002 06:27 PM
Re: Submit you HP-Ux tips and tricks and win easy 10points
Attached is a fairly simple script to do this. It is really handy if you don't have a tape jockey.
-Michael
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-15-2002 08:29 PM
тАО01-15-2002 08:29 PM
Re: Submit you HP-Ux tips and tricks and win easy 10points
#netfmt -t 50 -f /var/adm/nettl.LOG00 > /tmp/nettl
then check /tmp/nettl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-15-2002 08:33 PM
тАО01-15-2002 08:33 PM
Re: Submit you HP-Ux tips and tricks and win easy 10points
HP-UX 11.0 already have q4 package in /usr/contrib/bin
1. cd /var/adm/crash/crash.0
#/usr/contrib/bin/q4prep
q4 library files being created in /var/adm/crash/crash.0/q4lib
2.cd q4lib
#cp sample.q4rc.pl ~/.q4rc.pl
3. cd ..
#q4 -p
@(#) q4 $Revision: 1.79a $ $Date: 97/09/08 12:00:22 $ 0
Reading kernel symbols ...
Reading kernel data types ...
Initialized PA-RISC 2.0 address translator ...
Initializing stack tracer ...
Get the latest Q4 news by typing "news".
q4> include analyze.pl
loading ./q4lib/analyze.pl ...
loading ./q4lib/uname.pl ...
loading ./q4lib/misc.pl ...
loading ./q4lib/uptime.pl ...
loading ./q4lib/adjust.pl ...
loading ./q4lib/messagebuffer.pl ...
loading ./q4lib/addresses.pl ...
loading ./q4lib/tables.pl ...
loading ./q4lib/processors.pl ...
loading ./q4lib/crashes.pl ...
loading ./q4lib/rpb.pl ...
loading ./q4lib/traces.pl ...
loading ./q4lib/globals.pl ...
loading ./q4lib/processes.pl ...
loading ./q4lib/commands.pl ...
loading ./q4lib/credentials.pl ...
loading ./q4lib/threads.pl ...
loading ./q4lib/user.pl ...
loading ./q4lib/vm.pl ...
loading ./q4lib/vm_vfddbd.pl ...
loading ./q4lib/files.pl ...
loading ./q4lib/vfs.pl ...
loading ./q4lib/inode.pl ...
loading ./q4lib/buf.pl ...
q4>run Analyze UAP > ana.out
-----
then waiting till finish , or in another session
cd /var/adm/crash/crash.0
vi ana.out
search for stack
Stack trace from the first crash event:
stack trace for event 0
crash event was a TOC
FUNC PC SP FMP SSP
idle+0xa78 0.0x135a60 0.0x0'0d20c1f0 0.0x0'0d20c1e0 n/a
swidle_exit+0x0 0.0x1380ac 0.0x0'0d20c050 0.0x0'0d20c040 n/a
==================
now check patch database for similar stack.
you may come up with patches installation to fix this panic.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-15-2002 08:46 PM
тАО01-15-2002 08:46 PM
Re: Submit you HP-Ux tips and tricks and win easy 10points
#!/bin/sh
PATH=/bin:/sbin:/usr/bin:/usr/sbin
VG=$(vgdisplay |grep "VG Name" |awk '{print $NF}')
HOSTNAME=$(hostname)
logger -p local0.info "INFO: LVM backups for host <$HOSTNAME> starting..."
for v in $VG ; do
vgcfgbackup $v
if [ $? -ne 0 ] ; then
logger -p local0.err "ERROR: LVM backups failed..."
fi
done
logger -p local0.info "INFO: LVM backups for host <$HOSTNAME> finished..."
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-15-2002 10:38 PM
тАО01-15-2002 10:38 PM
Re: Submit you HP-Ux tips and tricks and win easy 10points
UNIX95= ps -e -o ruser,vsz,pid,ppid,args|sort -rnk2 |more
This gives the total memory usage per process.
P.S: That mib2agt leak is fixed with the new OV EMANATE142 patch PHSS_24945.
MND
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-16-2002 12:19 AM
тАО01-16-2002 12:19 AM
Re: Submit you HP-Ux tips and tricks and win easy 10points
Heres a script even a non root user can run to see how much free memory is on a box;
let x=$(grep -i physical: /var/adm/syslog/syslog.log|head -1|awk '{print $7}')/1048
let z=$(vmstat|tail -1|awk '{print $5}')*4096;let z=$z/1000000
let free=100000/$x*$z
let free=$free/1000
let free=100-$free
echo "$x Mb physical memory \n$z Mb memory free \n$free % used"
And a nifty C program to move a running process onto a particular CPU - great on servers with many CPU's and some process is hogging CPU 0 - which HP-UX really needs to use to keep everything running fast....
Cheers,
Stefan
#include
#include
#include
#include
#include
main(argc,argv)
int argc;
char *argv[];
{
gid_t sgid;
int i;
int pid;
if (argc < 2) {
printf("Usage: setproc spunum pid0 [pid1 ... pidn]\n");
exit(1);
}
sgid = atoi (argv[1]);
i = argc;
printf("Attempting to set process affinity for processor %d\n",sgid);
while (i-- >2) {
pid = atoi(argv[i]);
if ((sgid = SETPROCESS(sgid, pid)) < 0)
perror("setprocess failed");
printf ("processor %d pid = %d\n", sgid, pid);
}
}