- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Submit Very Basic System administration comman...
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
Forums
Discussions
Discussions
Discussions
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
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-22-2002 03:03 AM
01-22-2002 03:03 AM
Re: Submit Very Basic System administration commands and win easily points
We can allow / deny access to internet services running in a HPUX server by editing the file "/var/adm/inetd.sec".
we can allow /deny certain IPs or networks in accessing the services running on the server.
-vijay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2002 03:10 AM
01-22-2002 03:10 AM
Re: Submit Very Basic System administration commands and win easily points
#getconf KERNEL_BITS
(It will just display "64" if it OS is 64 bit.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2002 03:15 AM
01-22-2002 03:15 AM
Re: Submit Very Basic System administration commands and win easily points
#getip
simple command to find the hostname of a system?
# hostname
-Vijay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2002 03:17 AM
01-22-2002 03:17 AM
Re: Submit Very Basic System administration commands and win easily points
Simple command to find the current run level of HPUX server ?
#who -r
-Vijay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2002 04:27 AM
01-22-2002 04:27 AM
Re: Submit Very Basic System administration commands and win easily points
The most simple command that I know is "w", this command tell you time up, users connected to the system and load average.
Try it.
Regards,
Justo.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2002 06:01 AM
01-22-2002 06:01 AM
Re: Submit Very Basic System administration commands and win easily points
find /
This will list all files modified in the last 24 hours
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2002 06:43 AM
01-22-2002 06:43 AM
Re: Submit Very Basic System administration commands and win easily points
1) leave a window of this command running: # tail -f /var/adm/syslog/syslog.log
2) write a script that runs in a cron (frequently) to grep out a 'FATAL' or 'WARNING' (or any other message you deem important) out of the syslog and send report to pager if conditions exist.
3) write a script that runs in cron daily to filter out normal syslog entries and send the rest to your email address
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2002 06:50 AM
01-22-2002 06:50 AM
Re: Submit Very Basic System administration commands and win easily points
The clean up utility helps recovering space in /var/adm/sw/save dir by removing save set for superseeded patches.
You can commit single patch by using
#swmodify -x patch_commit=true
Thanks.
Prashant.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2002 08:12 AM
01-22-2002 08:12 AM
Re: Submit Very Basic System administration commands and win easily points
machine type:
# model
supported kernel mode:
# cat /etc/.supported_bits/ |
grep `model`
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2002 08:21 AM
01-22-2002 08:21 AM
Re: Submit Very Basic System administration commands and win easily points
This happens on occassion with a server we have.
To remove logins that you know are not valid:
/usr/sbin/acct/fwtmp < /etc/utmp > /tmp/utmp.txt
Edit the file /tmp/utmp.txt with your favorite editor. Using vi, I search for
the offending pid, make sure the line it is on matches the userid indicated
in the who output, then delete that one line. Repeat as needed for other
logins. Then:
/usr/sbin/acct/fwtmp -ic < /tmp/utmp.txt > /etc/utmp
Now when you do a who or 'w', then your results should be valid.
Be careful when doing this as utmp maintains a record of all users who are
currently logged on the system.
The file utmp, also btmp and wtmp, are binary files and you need to convert
them to a text file to edit. You can also use this command to trim the btmp
and wtmp files as they will grow limited only by the amount of disk space
availabel to them.
All the best
Victor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2002 08:40 AM
01-22-2002 08:40 AM
Re: Submit Very Basic System administration commands and win easily points
man linkloop for more info.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2002 09:37 AM
01-22-2002 09:37 AM
Re: Submit Very Basic System administration commands and win easily points
A) Scenario that could create a ghost disk :-
o A disk is physically removed before removing it logically. After a disk failure, a "vgscan -v" was issued in order to eliminate the damaged disk from /etc/lvmtab.
o LVM disk failure while system is still on-line.
B) This is what you should do ..
1) # vgdisplay -v vg03
....
vgdisplay: Warning couldn't query physical volume "/dev/dsk/c1t2d5". The specified path does not corrsspond to physical volume attached to this VG. vgdisplay: Warning: couldn't query all of the physical volumes.
...
==> YOU GOT GHOST !!
2) # strings /etc/lvmtab
...
vg03
/dev/dsk/c2t4d0
/dev/dsk/c1t2d5
...
==> will still show c1t2d5 in it but if you look at output from 1) closely ..
....
Curr PV 2
Act PV 1
....
LV Name /dev/vg03/lvol1
LV Status available/stale
....
==> you then know only 1 PV is good and we got a "stale" LV.
3) # lvdisplay -v /dev/vg03/lvol1
lvdisplay: Warning: couldn't query ..
....
LV Name /dev/vg03/lvol1
...
Mirror coipes 1
...
--- Distribution of logical volume ---
PV Name LE on PV PE on PV
/dev/dsk/c2t4d0 500 500
--- Logical extents ---
LE PV1 PE1 Status 1 PV2 PE2 Status 2
0000 /dev/dsk/c2t4d0 0000 current ??? 0000 stale
........
4) At this point if you run ..
# lvreduce -m 0 /dev/vg03/lvol1 /dev/dsk/c1t2d5
it'll still give you error ..."couldn't query..", to reduce it we need the "disk-key". Run 3) with -k again to get the "disk-key" value.
5) # lvdisplay -v -k /dev/vg03/lvol1
==> The PV1 and PV2 column, instead of displaying the device path, it'll show the "disk-key" value (either 0 or 1).
6) # lvreduce -m 0 -k /dev/vg03/lvol1 1
==> Now reduce it with the "disk-key" value. In this case it's 1.
7) Finish up the rest of the steps ..
# mv /etc/lvmtab /etc/lvmtab.org
# vgscan -v
# vgreduce -f vg03 (f option force removal of missing PVs)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2002 07:17 PM
01-22-2002 07:17 PM
Re: Submit Very Basic System administration commands and win easily points
Instead of this example cron entry:
10 * * * * /dir/script.sh >> /dir/log 2>&1
Include the following lines in script, to have script maintain the location of the log file.
The benefits of this are:
1. Log file known from script and therefore can trim it's own log.
2. Simple crontab entry
3a. Run from command line produces stdout
3b. Run from cron/at goes to log instead
Insert the following into script:
----
LOGFILE=/dir/log
if ! /usr/bin/tty > /dev/null 2>&1
then
# User running script from crontab or at job
# Redirect all standard output/error to $LOGFILE
exec >> $LOGFILE
echo "-----------------------------------------"
echo $DATE
fi
You can remove echo's of course without a problem. Change the >> to > if you don't want to append the log.
Glenn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2002 07:23 PM
01-22-2002 07:23 PM
Re: Submit Very Basic System administration commands and win easily points
Semi-safe:
ps -ef | grep username | cut -c10-15 | xargs kill -9
Safer:
ps -ef | awk '{print $1" "$2}' | grep ^username | awk '{print $NF}' | xargs kill -9
Glenn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2002 12:44 AM
01-23-2002 12:44 AM
Re: Submit Very Basic System administration commands and win easily points
==============================================
(ie where we can aasign new hostname,timezone,date_time,root_passwd,ip_address,addl. network parameters like gateway,subnetmask) ?
# set_parms
To change time ip_address alone
===============================
#set_parms ip_address
similarly we can change the rest.
Note :
This command will be helpfull in changing the network parameters effectively without any problems.
Just a change in /etc/hosts will not make enough changes in a hp server to assign a new ip.
-Vijay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2002 12:44 AM
01-23-2002 12:44 AM
Re: Submit Very Basic System administration commands and win easily points
==============================================
(ie where we can aasign new hostname,timezone,date_time,root_passwd,ip_address,addl. network parameters like gateway,subnetmask) ?
# set_parms
To change ip_address alone
===============================
#set_parms ip_address
similarly we can change the rest.
Note :
This command will be helpfull in changing the network parameters effectively without any problems.
Just a change in /etc/hosts will not make enough changes in a hp server to assign a new ip.
-Vijay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2002 12:47 AM
01-23-2002 12:47 AM
Re: Submit Very Basic System administration commands and win easily points
#getrunlvl
-Vijay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2002 12:50 AM
01-23-2002 12:50 AM
Re: Submit Very Basic System administration commands and win easily points
# hpux -is
-vijay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2002 12:51 AM
01-23-2002 12:51 AM
Re: Submit Very Basic System administration commands and win easily points
hpux -lm
-vijay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2002 12:54 AM
01-23-2002 12:54 AM
Re: Submit Very Basic System administration commands and win easily points
hpux -im
-vijay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2002 01:41 AM
01-23-2002 01:41 AM
Re: Submit Very Basic System administration commands and win easily points
To delete the files which are older then 15 days in a directory. Script contains just two lines.
find /xyz/temp -mtime +15 -exec ls -l {} \;
find /xyz/temp -mtime +15 -exec rm {} \;
thats it..
Cheers !!!
VM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2002 03:02 AM
01-23-2002 03:02 AM
Re: Submit Very Basic System administration commands and win easily points
for lv in `vgdisplay -v|awk '/LV Name/ {print$NF}'`;do lvdisplay -v $lv|grep -i stale;done
All the best
Victor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2002 05:19 AM
01-23-2002 05:19 AM
Re: Submit Very Basic System administration commands and win easily points
enter list of users to whom you want to deny ftp in the file "/etc/ftpusers"
Generally system users (sys group members) are listed in this file for security precautions.
-vijay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2002 07:39 AM
01-23-2002 07:39 AM
Re: Submit Very Basic System administration commands and win easily points
cd /sbin/init.d
./nfs.server stop
./nfs.client stop
./nfs.core stop
./nfs.core start
./nfs.server start
./nfs.client start
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2002 02:43 AM
01-24-2002 02:43 AM
Re: Submit Very Basic System administration commands and win easily points
/usr/lbin/modprpw -k