Operating System - HP-UX
1833132 Members
3484 Online
110051 Solutions
New Discussion

Re: Submit Very Basic System administration commands and win easily points

 
SOLVED
Go to solution
Santhosh.H
Frequent Advisor

Submit Very Basic System administration commands and win easily points

Suchas stopping service, disabling service, booting in single user mode, taking a backup, shutdown, rebooting, changing init levels, crash recovery, going into GSP etc
Be a true Professional
138 REPLIES 138
Santhosh.H
Frequent Advisor

Re: Submit Very Basic System administration commands and win easily points

to change init level
#init 1--4
to go into GSP
#^B
to come out of GSP
GSP>co
to reset the system in case of hang
GSP>rs
Be a true Professional
Scott Van Kalken
Esteemed Contributor

Re: Submit Very Basic System administration commands and win easily points

reset a hung GSP without rebooting

stty +resetGSP


helped me a few times.
Animesh Chakraborty
Honored Contributor

Re: Submit Very Basic System administration commands and win easily points

See the attachment
Did you take a backup?
Animesh Chakraborty
Honored Contributor

Re: Submit Very Basic System administration commands and win easily points

basic lvm command attached.
Did you take a backup?
Justo Exposito
Esteemed Contributor

Re: Submit Very Basic System administration commands and win easily points

Hi,

Commands for cluster:
cmhaltpkg pkgname (shutdown the package)
cmrunpkg -v -n nodename pkgname (startup the package)
cmviewcl (Show the status for package)
cmviewcl -v (Show detailed statusby package)

Regards,

Justo.
Help is a Beatiful word
Paula J Frazer-Campbell
Honored Contributor

Re: Submit Very Basic System administration commands and win easily points

Good Morning to all

FLASHING ATTENTION LIGHT :-


From a console session, login and press CRTL.

Enter sl (Show Logs)from the command line e.g. GSP> sl

You will be prompted to select the logs you wish to view, select "e" for the error logs.

View the error logs.

Enter q from the command line to end the session.

Enter "co" to return to the console.

The attention light should now be off.

Paula
If you can spell SysAdmin then you is one - anon
Justo Exposito
Esteemed Contributor

Re: Submit Very Basic System administration commands and win easily points

Hi,

Very important and simple, to do a make recovery tape:
/opt/ignite/bin/make_recovery -ACv

Regards,

Justo.
Help is a Beatiful word
Michael Tully
Honored Contributor

Re: Submit Very Basic System administration commands and win easily points

Hi,

Trusting and on-trusting a system.

# /usr/lbin/tsconvert (to trust)
# /usr/lbin/tsconvert (to untrust)

When trusting a system make sure that
the users know that they will need to
change their passwords.

To administer a trusted system:

# /usr/lbin/modprpw -k
(this will unlock an account)

See the man pages in the attached
thread....

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x98153d853cd9d5118ff40090279cd0f9,00.html

-Michael
Anyone for a Mutiny ?
Stefan Farrelly
Honored Contributor

Re: Submit Very Basic System administration commands and win easily points


Quick and easy way to check if your server just rebooted itself or crashed due to a hardware problem;

cd /var/tombstones
grep chassis $(ls | tail -1)

If it says; No HPMC chassis codes logged

Then no hardware problem. If there are some hex numbers there then you need to pass them to HP to check what hardware caused the problem.

Im from Palmerston North, New Zealand, but somehow ended up in London...
Justo Exposito
Esteemed Contributor

Re: Submit Very Basic System administration commands and win easily points

Hi Again,

Go to single user mode:

shutdown (without prameters)

Regards,

Justo.
Help is a Beatiful word
Kenny Chau
Trusted Contributor

Re: Submit Very Basic System administration commands and win easily points


umount /dev/vg00/lvol1
lvextend -L larger_size /dev/vg00/lvol1
extendfs -F hfs /dev/vg00/rlvol1
mount /dev/vg00/lvol1 mount_directory

Hope this helps.
Kenny.
Kenny
Steven Sim Kok Leong
Honored Contributor

Re: Submit Very Basic System administration commands and win easily points

Hi,

# sam -r

Allows you to easily restrict users in the execution of commands with root privileges.

Hope this helps. Regards.

Steven Sim Kok Leong
Justo Exposito
Esteemed Contributor

Re: Submit Very Basic System administration commands and win easily points

Hi,

To run a script in background mode:

myscript &
nohup myscript &

Regards,

Justo.
Help is a Beatiful word
Andreas D. Skjervold
Honored Contributor
Solution

Re: Submit Very Basic System administration commands and win easily points

Hi

Before crash!:
- /opt/ignite/bin/make_recovery -AvC
(C option to create config file used to check wether new make_recovery has to be run)
-/opt/ignite/bin/check_recovery

After crash:
- replace root disk
- insert recovery tape in drive
- boot system
- Interupt boot sequence and boot from tape
- Choose "Install HP-UX" to get things back, or "Advanced options" if you want to make filsystem changes etc.

And you are fit to go.

Andreas
Only by ignoring what everyone think is important, can you be aware of what everyone ignores!
Justo Exposito
Esteemed Contributor

Re: Submit Very Basic System administration commands and win easily points

Hi,

Basic commands to copy files and directories to a tape:
fbackup/frestore
tar
cpio
dd

Basic commands for compress/uncompress files and directories:
gzip
compress/uncompress
pack/unpack
zcat

Commands for translate from ascii dos format to Unix format and viceversa:
dos2ux
ux2dos

Commands to transfer files between boxes:
ftp
rcp
remsh hostname cat file > file

Regards,

Justo.
Help is a Beatiful word
Bill McNAMARA_1
Honored Contributor

Re: Submit Very Basic System administration commands and win easily points

easier way to find if your system rebooted or paniced:

tail -20 /etc/shutdownlog

Other things:
-------------

# ioscan -fnk

is much much faster (and more than likely what you want to do) than a full ioscan -fn

# nettladm

Nice graphical interface to nettl subsystem logging.

/usr/sbin/remove_patches

is quite useful when short on disk space.

# mstm (or xstm)
are nice ways to check hardware paths and test hardware.

Later,
Bill
It works for me (tm)
nancy rippey
Trusted Contributor

Re: Submit Very Basic System administration commands and win easily points

ls -lq (long listing that will also show unprintable characters

A good way to find 'garbage' characters in an ascii file is to use 'ed'. When in the editor ',l' will produce the entire file with all unprintable characters, '.l' will give you a line at a time.
nrip
harry d brown jr
Honored Contributor

Re: Submit Very Basic System administration commands and win easily points

find / -type f -size -1000000c -exec grep -il somesting {} \;

live free or die
harry
Live Free or Die
Jeff Machols
Esteemed Contributor

Re: Submit Very Basic System administration commands and win easily points

if a file is not a text file

# strings file

this will give you list off man readable strings, good for core files, lvmtab...
Mark Vollmers
Esteemed Contributor

Re: Submit Very Basic System administration commands and win easily points

Here's a useful one (for users, too) to find running processes

ps -ef

can append this with |more for single pages, and |grep "string" to search for specifics

Once the PID number is known:

kill PID

to kill process, add -9 to force it (may cause zombie processes)

Mark
"We apologize for the inconvience" -God's last message to all creation, from Douglas Adams "So Long and Thanks for all the Fish"
Helen French
Honored Contributor

Re: Submit Very Basic System administration commands and win easily points

1) Rastart Internet daemon services:

# inetd -c

2) Edit current cron file:

# crontab -e

3) Password file secure editor:

# vipw

4) Display and modify variables in the stable storage. In another words, change primary and alternate boot paths from command line:

# setboot

Shiju
Life is a promise, fulfill it!
Craig Rants
Honored Contributor

Re: Submit Very Basic System administration commands and win easily points

Determining the lbolt
You can use the following information to determine which device
generates the lbolt/timeout errors:

1f 02 6 0 00
__ __ _ _ __
| | | | |
major# | target | flags
| |
bus# lun

Per this information:

- major# (1f) is 31 in decimal, and major number 31 should be
sdisk on your system.

- bus# (02) is the card instance number to which the device is
attached.

- target (6) is the device's scsi id.

- lun (0) is the device's logical unit number.

Therefore, this device maps to /dev/dsk/c2t6d0.

C
"In theory, there is no difference between theory and practice. But, in practice, there is. " Jan L.A. van de Snepscheut
Jeff Machols
Esteemed Contributor

Re: Submit Very Basic System administration commands and win easily points

ioscan -fun | grep NO

search for missing or bad hardware
Deshpande Prashant
Honored Contributor

Re: Submit Very Basic System administration commands and win easily points

HI
Build kernel manually.
#cd /stand
#cp /stand/vmunix /stand/vmunix.OLD
#cp /stand/system /stand/system.OLD

#cd /stand/build
#/usr/lbin/sysadm/system_prep -v -s system
#vi system ->edit file for needed parameters
or use kmtune to change kernel parameter
#kmtune -s -S /stand/build/system

#mk_kernel -s /stand/build/system -v
#mv /stand/build/system /stand/system

#kmupdate
#cd
#/etc/shutdown -r -y 0


Thanks.
Prashant.

Take it as it comes.