OS4k Linux Commands PDF

Download as pdf or txt
Download as pdf or txt
You are on page 1of 17

OpenScape 4000 - V7 UC HiPath 4000 - V6

Unified Communications Linux vServer (OS4k) Linux Communication Server (HP4k)

Linux commands for OS4k V7 & HP4k V6 => HostName~: #


Linux commands for Assistant / CSTA V6 up => linux~: #
SUSE Linux syntax examples ....

Contents:
0. Scope & Help
I. Cron
II. DSCXL2
III. Directory
IV. Edit Files
V. Files
VI. Hard Disk
VII. Informix
VIII.Network
IX. Search
X. Shutdown / Restart
XI. SW - Apps
XII. Time
XIII.Troubleshoot

Changes:
1.Published=Dec. 31, 2012 = Happy New Year! / 2.Rev.= Feb.2013 = minor changes. / 3.Rev.=Apr.2013= v6r2 tethereal ( add wireshark package )
4.Rev.=July23 = rewrote TIME section for Robert Reed. / 5.Rev.= Dec.2 = Unify + egrep = find a word inside a file
6.Rev.=July 2014 = added crm resource rsc4
7.Rev.=Aug.2014 =add #history, Tab key and Michael (Sandy-UK) Gallard's suggestion = # ls -hlt => "h= human"
8.Rev. = Oct.2104 = echo "" > file_name_to_empty
9.Rev. = May 2015 = added interpretation for #service ntp status
= Under Construction... ; changing on the fly....

Do you have an useful Linux command to share ?


Please send to me, I'll post on this doc. (collaboration)...

Total of 17 pages; growing...


Repository: km & http://4000.global-intra.net
[email protected]
Tec.Support Eng. / Global Operations (G0)
Irving - TX 75038

1
0. Scope & Help:
OS4k & HP4k V6 are based on SUSE Linux OS and runs Linux-VM for Assistant & CSTA.
This doc. shows useful commands examples for daily work and help you to like Susy-Linux & VM....
For FTP and how to access Linux, consult the doc. "V6 Accessibility and Shutdown Procedures.pdf";
locate on http://tac.global-intra.net => Large Platform -> HiPath4000 V6 -> Reference and Config. docs. and on GSI.flow => KM

# apropos subject => search the subject on commands (e.g.: ntp


or list or what ever...). A PROPOSito = on purpose...
OM-dp2B:~ # apropos ntp
grantpt (3p) - grant access to the slave pseudo-terminal device
Net::NNTP (3pm) - NNTP Client class
ntp.conf (5) - Server Options
ntp_acc (5) - Access Control Options
ntp_auth (5) - Authentication Options
ntp_clock (5) - Reference Clock Options
ntp_misc (5) - Miscellaneous Options
ntp_mon (5) - Monitoring Options
ntpd (8) - Network Time Protocol (NTP) daemon
ntpdc (8) - special NTP query program
ntpq (8) - standard NTP query program
ntpstat (8) - show network time synchronisation status
ntptime (8) - read kernel time variables

# command --help => e.g.: # df --help => get help on arguments "-x" (linux -secret)
# man command => # man df => to get out of manual help => Ctrl Z
# ls /bin => displays most of commands
/bin = binary = where the executables are, can be also on /sbin, /cla/bin, etc...
# whatis command
OM-dp2B:~ # whatis df
df (1) - report file system disk space usage
df (1p) - report free disk space

# whereis command
OM-dp2B:~ # whereis df
df: /bin/df /usr/share/man/man1/df.1.gz /usr/share/man/man1p/df.1p.gz
##################################################################################################

I. Cron: => Chronology


To insert an automatic schedule run command on Linux; do:
# crontab -e
Insert key ==> to insert / edit the cron file and type as below
0 1 * * * service sysinfod stop
2 1 * * * service sysinfod start
Press Esc key and type :wq => write and quit
The result you can see with #crontab -l => as below example....
Explanations of commands: at 1:00 AM (every day), cron will execute #service sysinfod stop
and at 1:02 AM cron will execute #service sysinfo start
* * * * * = *minute, *hour, *day, *month, *day_of_week (0~6=Sunday~Sat.)

Example:
HP4K-COR2-COL:~ # crontab -l
# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (/tmp/crontab.XXXX4ZmFLr installed on Fri Sep 28 12:02:02 2012)
# (Cron version V5.0 -- $Id: crontab.c,v 1.12 2004/01/23 18:56:42 vixie Exp $)
0 * * * * /var/opt/linux-basicinit/Cron-SC2HWC.sh
0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58 * * * *
/opt/cla/bin/checkcla
* * * * * /usr/sbin/systemdiag.sh
0 1 * * * service sysinfod stop
2 1 * * * service sysinfod start

2
II. DSCXL2 processor card:
BIOS version date for VXCC0001 is 02/08/2010 which is the correct/needed version on V6R1.
BIOS date for VXCC0002 is 08/06/2010 which is the faulty version.
BIOS =Basic Input Output System = FirmWare for initialization (boot) of card (motherboard)...

# /usr/sbin/dmidecode -s bios-release-date
12/12/2011 => for V6R2 VXCC0004

DSCXL2:~ # service boot.bios_dscxl status


Checking BIOS version of DSCXLv2:
... the actual DSCXLv2 BIOS version is: VXCC0004 - 12/12/2011 (12/13/11)
... no DSCXLv2 BIOS update available. unused =>Actual card is ok, but if you
replace the DSCXL2 loaded w/old bios; the current HD will not update the bios. Fix for V6R2:
DSCXL2:~ #cp /opt/biosdscxl/VXCC0004.UPD /var/opt/biosdscxl/
DSCXL2:~ # service boot.bios_dscxl status
Checking BIOS version of DSCXLv2:
... the actual DSCXLv2 BIOS version is: VXCC0004 - 12/12/2011 (12/13/11)
... the DSCXLv2 BIOS is up to date.
----------------------------------------------------------------------------------------------------------------------------------------
OM-dp2A:~ # checkydata => HP4k Platform Version
V6_R1.12.2
Component softgate is not installed
Version Check OK

OM-dp2A:~ # cat /var/run/dscxlv2/hwinfo.xml => card info


/etc/init.d/boot.d/S15boot.dscxlv2</comment>
<HwType>DSCXLv2
<HwVariant>080BAABDAIA1
<HwVersion>V2.2
<HwSerial>05063857

JW-Srv-kit:~ # checkydata
V6_R2.14.5
Version Check OK
JW-Srv-kit:~ # cat /etc/SuSE-release
SUSE Linux Enterprise Server 11 (x86_64) => VERSION = 11 => PATCHLEVEL = 1
JW-Srv-kit:~ # cat /proc/version or Display Linux kernel: # uname –r or -a = all

OM-hpa60:~ # uname -a
Linux OM-hpa60 2.6.32.59-0.7-default #1 SMP 2012-07-13 15:50:56 +0200 x86_64 x86_64 x86_64 GNU/Linux
/* This kernel corrects the 208days issue /*

!! Do NOT install Linux patch directly yourself; those are delivered by SEN in format of HP4k V6 PLaTform (PLT) Hot Fix.
Do NOT try to change the Linux behaviour as e.g. delete/change kernell files; will have bad collateral effects as restart, apps broke.
From V6R2 Linux-host is running on Novell: SUSE Linux Enterprise Server "JeOS" (Just enough Operating System based on SLES 11 SP1)..
The JeOS is informally called also as "Jesus" = Just Enough SUSe linux OS !!
---------------------------------------------------------------------------------------------------------------------------------------------------------------
OM-dp2B:~ # free -g => Memory in Gigabyte
total used free shared buffers cached
Mem: 3 3 0 0 0 0
-/+ buffers/cache: 2 1
Swap: 15 0 15

OM-dp2B:~ # cat /proc/meminfo => Memory detailed info


MemTotal: 3924828 kB
MemFree: 214192 kB
Buffers: 48608 kB
Cached: 916064 kB
....... .........

OM-hpa60:~ # cat /proc/cpuinfo => running hw processor


processor : 0
vendor_id : GenuineIntel
model name : Intel(R) Core(TM) i5 CPU 660 @ 3.33GHz
##################################################################################

3
III. Directory:

linux~: # => Assistant, ~ = /root/ directory


OM-dp2A~:# => OM-dp2A ( set on # yast ) = HP4k V6 Linux-Hostname, ~ = /root/ directory

# pwd => = present work directory = where am I ?


# cd / => = change directory to / = goes to initial directory tree;
# cd /opt/uba => goes direct to /opt/uba/....
# cd => goes to /root/..
# cd .. => back one subdirectory.
linux:~ #cd /opt/uba/backup
linux:/opt/uba/backup #pwd
/opt/uba/backup
linux:/opt/uba/backup #cd ..
linux:/opt/uba #

# mkdir xxxxx => make / create a directory xxxxx


# rmdir yyyyy => remove directory yyyyy (directory must be empty)

############################################################

IV. Edit Files with vi (vi-sual)


# vi file_name_to_edit
Insert key => then scrool down, enter to create line and type......
dd = delete line
Esc then type :wq = write and quit
:q! = quit, not saving; when you're lost...

####################################################################################################

V. Files:

4
Abort the view of a file:
Ctrl C or Ctrl Z or Ctrl Q or Delete "Key"; one of them should work...

Compare Files (difference):


# diff file1 file2
linux:/home/engr # diff /opt/hbr/sys/perl/hbr/SRVftp.pm /opt/hbr/sys/perl/hbr/SRVftp.pm.orig

Copy file / directory: # cp file_name1 file_name2_copied

Create a file: # touch file_name_to_create

Empty a file: # echo "" > file_name_to_make_as_1byte_size


Overwrite the existing PDS update package on Survivable Softgate Assistant with a dummy: #echo "Dummy PDS for SurvSG" > /.AS/SWS/RLC/rmx/partfiles/*.e.zip

Find a file:
# find / -name file_name (e.g.: #find / -name message* )
# find /opt -size +500M => find files bigger than 500M on directory /opt

Delete file = rm (remove):


# rm file_name => warning !!! Vorsicht !! cuidado!! you can not reverse.....
# rm -r directory => rm=del. and -run Forest; you will delete the entire directory with all files inside

List files / directories:


# ls -hlt => best list -h=human readable=K,M,G -l=long format -t=time showing 1.new files

House2-hipath4000v6:/opt/dscxl/share # ls -hlt
total 5.9G
-rw-rw-rw- 1 root root 2.9G Aug 27 08:12 hicom_2011_08_05_21_36.img
-rw-r--r-- 1 root root 214M Apr 23 09:03 RMX-db_save.img.bz2
-rw-rw-rw- 1 root root 2.9G Apr 23 08:54 hicom_second_harddisk.img
lrwxrwxrwx 1 root root 42 Apr 23 08:50 hicom_second.img ->
/opt/dscxl/share/hicom_second_harddisk.img
lrwxrwxrwx 1 root root 43 Aug 5 2011 hicom_ccap.img ->
/opt/dscxl/share/hicom_2011_08_05_21_36.img
lrwxrwxrwx 1 root root 43 Aug 5 2011 hicom.img -> /opt/dscxl/share/hicom_2011_08_05_21_36.img
drwx------ 2 root root 16K Nov 18 2010 lost+found

# l => = # ls -alF => list -all, long-format, Files-directories-symbolic


# l -t => -time, show latest files first, order by date...
# l -rt => -reverse order, first old files to list....
# ls => list short format or # ls -1 => list 1 per line
# ls -Shl => -Sort from file sizes, -hl see above..

OM-Srv-kit:/var/opt/soco/config # l
total 36
drwxrwxrwx 8 root root 4096 Oct 31 04:39 ./
drwxr-xr-x 14 root root 4096 Nov 1 09:44 ../
-rw-r----- 1 root root 2804 Oct 31 15:01 initialcfg.xml
drwxr-x--- 2 root root 4096 Oct 31 12:14 pbc_1/
drwxr-x--- 2 root root 4096 Oct 31 04:39 pbc_11/
drwxr-x--- 3 root root 4096 Oct 31 04:31 pbc_2/
drwxrwxrwx 2 root root 4096 Nov 11 15:17 pbc_21/
drwxr-x--- 3 root root 4096 Oct 31 04:32 pbc_4/
drwxrwxrwx 4 root root 4096 Jul 17 2011 tones/

OM-Srv-kit:/var/opt/soco/config # l -t
drwxrwxrwx 2 root root 4096 Nov 11 15:17 pbc_21/
-rw-r----- 1 root root 2804 Oct 31 15:01 initialcfg.xml
drwxr-x--- 2 root root 4096 Oct 31 12:14 pbc_1/
.......... . .... .... .... ... .. .. .. .....

OM-Srv-kit:/var/opt/soco/config # ls
initialcfg.xml pbc_1 pbc_11 pbc_2 pbc_21 pbc_4 tones

5
Permissions:
linux:/.AS/SWS # l -t

drwxrwxr-x 2 root unity 4096 Dec 23 17:49 lock/


-rw-r--r-- 1 root unity 1425369 Dec 23 17:49 act_history.tgz
drwxrwxr-x 2 licm unity 4096 Nov 6 08:59 license/
drwxrwxr-x 2 hispa unity 4096 Jan 17 2012 HF/
drwxrwxr-x 2 swt unity 4096 Jan 17 2012 TFTP_MISC/

1. letter ==> d = directory - = file l = link


the others are Permissions: r = read w = write x = execute - = none
2.3.4. letters are permis. for the Owner of the file/directory
5.6.7. are permis. for the Group ( linux:~# groups engr => engr : service = user : group)
8.9.10. perm. for others

example:
-rwxr-xr-- 1 root unity 1425369 Dec 23 17:49 act_history.tgz

- rwx r-x r-- 1 root unity 1425369


1 234 567 8910 link Owner Group File Size
Owner: root has permissions to read, write and execute ( - file rwx )
Group: unity users can read and execute ( r - x )
others: can read only.

# chmod xxx filename => change mode permissions as others need for e.g. file transfer....
soco2-sys2:/tmp # l Mo*
- rw- --- --- 1 root root 107035645 May 11 08:10 MoriyaTrace.pcap
soco2-sys2:/tmp # chmod 754 MoriyaTrace.pcap
soco2-sys2:/tmp # l Mo*
- rwx r-x r-- 1 root root 107035645 May 11 08:10 MoriyaTrace.pcap

How "xxx" is coded ?


754 => Owner=7 Group=5 Others=4 r w x => binary 111 = 4+2+1 decimal = 7
r - x => bin. 101 = 4+0+1 = dec. = 5
r - - => bin. 100 = dec. 4
rwx rwx rwx chmod 777 filename
rwx rwx r-x chmod 775 filename
rwx r-x r-x chmod 755 filename
rw- rw- r-- chmod 664 filename
rw- r-- r-- chmod 644 filename
--------------------------------------------------------------------------------------------------------------------------------------------

Rename or and move the file to another_name or to new_place/directory:


# mv "old_file or directory" "new_name or to new_dir." => move = mv; there is no ren (rename)

View Inside of Files:


# cat file_name_to_view => cat scan; cat=concatenate
# more file_name => if it's a big file, allow to stop/scroll
# tail -f file_name_to_show => -follow = dynamically displays the end (tail) of running file
OM-dp2A~:# tail -f var/log/messages
Ctrl C => to get out

# egrep -i "restart" /var/log/messages => find the word restart inside the file (messages).
# bzcat /var/log/messages-2013* |egrep -i "restart" => find inside zipped files.

###############################################################################

6
VI. Hard Disk:
Partition size usage...
OM-dp2A:/ # df -h => disk free -human understandable
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/dscxl-root
60G 4.8G 52G 9% /
devtmpfs 1.9G 436K 1.9G 1% /dev
tmpfs 1.9G 19M 1.9G 1% /dev/shm
/dev/md0 989M 77M 862M 9% /boot
/dev/mapper/dscxl-images
9.9G 1.1G 8.3G 12% /mnt/images
/dev/mapper/dscxl-var
40G 18G 21G 47% /var
/dev/drbd1 30G 21G 7.9G 73% /opt/Assistant/share
/dev/drbd0 20G 5.9G 13G 32% /opt/dscxl/share
/dev/drbd2 18G 5.7G 12G 34% /opt/CAP_Inside/share
/dev/drbd3 30G 2.3G 26G 8% /var/pgsql

linux:/.AS/BACKUP/Backup # du -h => disk usage -human understandable


517M ./003
307M ./002
307M ./004
517M ./001
1.7G .
linux:/.AS/BACKUP/Backup # ls
001 002 003 004

# find /opt -size +500M => find files bigger than 500M on directory /opt

Blank/Erase the HD:


# dd if=/dev/zero of=/dev/sdb bs=512 count=255
dd = disk duplicate
if = input file
zero = fill disk with "0" = blank the dev/sdb
of = output file
sdb = hd on slot 2 for Raid / image hd copy....
sdb = second hd on HDTRay, slot 2, bottom slot; used for Raid / Recovey Image HD..
bs = blocks
=> warning !! Achtung !! cuidado !! perigo !! abunai !! => must be sd "b"

HD Info:
OM-dp2A:~ # smartctl -a /dev/sda
smartctl 5.39 2008-10-24 22:33 [x86_64-suse-linux-gnu] (openSUSE RPM)
Copyright (C) 2002-8 by Bruce Allen, http://smartmontools.sourceforge.net
=== START OF INFORMATION SECTION ===
Device Model: ST9250410AS
Serial Number: 5VGBLXSH
Firmware Version: 0002SDM1
User Capacity: 250,059,350,016 bytes
Device is: Not in smartctl database [for details use: -P showall]
ATA Version is: 8
ATA Standard is: ATA-8-ACS revision 4

#############################################################################

VII. INFORMIX - database:


New Link Jan.2015: http://brqb022x.global-intra.net/mediawiki/index.php/Manager_Sustaining:Informix

http://172.27.4.30/wiki/index.php5/Manager_Sustaining:Informix (only over Unify Intranet access)

7
VIII. Network on Linux-host:

# yast => yet another service tool => networking settings...


Warning: - Never click OK on yast (blue screen) on production system, if you're on Network Devices -> Netw. Settings page.
If OK choosed during yast session a restart will occur as yast Network ok resets all lan ports (eth0...eth7) even if you did not change anything
Use always Cancel / Quit or Abort button to get out of yast, Netw.Settings..

# ping <=|=> pong


OM-dp2A:~ #ping 172.19.217.88 -c 5 => -count 5; #ping IP =>without -c; abort w/ Ctrl C
PING 172.19.217.88 (172.19.217.88) 56(84) bytes of data.
64 bytes from 172.19.217.88: icmp_seq=1 ttl=63 time=1.14 ms
.. ..... .... ... .. ... .. .... ... . ... .. .... . .. ..
64 bytes from 172.19.217.88: icmp_seq=5 ttl=63 time=0.876 ms
--- 172.19.217.88 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4002ms
rtt min/avg/max/mdev = 0.758/0.874/1.142/0.139 ms

# ifconfig /* or specific port #ifconfig eth0 =>shows MAC address, ip/netmask, frame errors....
OM-dp2A:~ # ifconfig eth0 => interface config.
eth0 Link encap:Ethernet HWaddr 00:20:CE:DF:BA:70
inet addr:172.19.208.201 Bcast:172.19.208.255 Mask:255.255.255.128
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:9226595 errors:0 dropped:0 overruns:0 frame:0 => if shows errors, FCK
TX packets:4563134 errors:0 dropped:0 overruns:0 carrier:0 =>check w/IT, port settings.
collisions:0 txqueuelen:1000

# ethtool or # ethtool eth0 => show current running speed:1000Mb/s => 1Gbit Full Duplex
OM-dp2A:~ # ethtool eth0 => ethernet tool lan_port => Settings for eth0:
Supported ports: [ TP ] Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Advertised auto-negotiation: Yes
Speed: 1000Mb/s
Duplex: Full
Auto-negotiation: on
Link detected: yes

# ifup ethx => interface up ↑ # ifdown ethx -> ... down ↓


# ifstatus ethx
OM-dp2A:~ # arp => address resolution protocol
Address HWtype HWaddress Flags Mask Iface
172.19.208.174 ether 00:11:43:ce:af:e0 C eth0
172.19.208.131 ether 00:12:a9:bf:95:81 C eth0
155.75.27.1 ether 00:0d:65:b1:02:c0 C eth2
OM-dp2B ether 00:20:ce:df:b8:14 C eth4
155.75.27.2 * * MP eth2
172.19.208.140 * * MP eth0
OM-dp2A:~ # route => Kernel IP routing table; same as on Portal/Lan Overview
Destination Gateway Genmask Flags Metric Ref Use Iface
155.75.27.2 * 255.255.255.255 UH 0 0 0 vethdef1
172.19.208.140 * 255.255.255.255 UH 0 0 0 br-cust
172.19.208.128 * 255.255.255.128 U 0 0 0 eth0
10.0.187.0 * 255.255.255.0 U 0 0 0 eth4
155.75.27.0 * 255.255.255.0 U 0 0 0 eth2
default 172.19.208.129 0.0.0.0 UG 0 0 0 eth0
OM-dp2A:~ # traceroute 172.19.217.88 => path to the destination ip
traceroute to 172.19.217.88 (172.19.217.88), 30 hops max, 40 byte packets using UDP
1 172.19.217.81 0.561 ms 0.267 ms 0.455 ms
2 172.19.217.88 0.853 ms 0.655 ms 0.629 ms

# netstat -na => network statistic -all = show connections,


-numeric ports and status; select w/ # netstat -na | grep blabla
JW-Srv-kit:~ # netstat -na | grep 4060
tcp 0 0 172.19.217.84:4060 0.0.0.0:* LISTEN => SG vSTMI IP:port 4060 hearing
tcp 0 0 172.19.217.84:4060 172.19.209.167:1400 ESTABLISHED => vSTMI x IP HFA Phone:Port
# netstat -na | grep :22 and # lsof -i :22 => who's using port 22 = ssh
# netstat -taupen => shows all opened ports

8
IX. Search:
# find / -name blabla* =>find a file blabla.... starting on initial directory / => all disk....
# grep -i bleble* filename => find the word B(b)leble [-i=ignore case (lower or upper)] inside the file.
= Global Regular ExPression (grep)
To use 2 commands together use "|" pipe sign key...
OM-dp2A:~ # find / -name *irst* | grep -i instal
/opt/fiw/FirstInstallWizard => found directory with irst and the work instal together
/var/opt/soco2/installrepo/FirstInstallWizard
/var/opt/sysbackup/sysbackup_2012_12_05_17/FirstInstallWizard
/var/log/firstinstall.log
/usr/share/autoinstall/modules/firstboot.desktop

linux: # find /opt -size +5G => find files bigger than 5G on directory /opt
linux: # find /opt -size +50000 | sort -nr => sort files from big size to small (-nr=numeric and reverse)
linux:/ # find / -size +50000 | sort -nr | head -4 => + head = show only 4 results
/var/repgen/reports_prerestore/setup.exe
/var/hf/ape/PLT-V6_R1.12.1.tar
/var/hf/ape/CSTA-V1_R11.204.1.tar
/var/hf/ADP-V6_R1.13.7.tar

# egrep -i "restart" /var/log/messages => find the word restart inside the file (messages).
# bzcat /var/log/messages-2013* |egrep -i "restart" => find inside zipped files.

# history 25 => shows the last 25 commands typed;


same result can be done with upper arrow key ↑
and you can repeat the command showed..

The other lazy way to type is initiating some letter and hiting Tab key to let Linux complete for you,
this works for directories, files & commands. I love it with my hamburguer.

#################################################################################

9
X. Shutdown => try first to use Portal -> Maintenance -> Shutdown/Reboot
=> if Portal is down; # shutdown -h now or # init 0 or # halt or # poweroff

=> don't shutdown remotely; customer will kill you !! |_,--> Power Off / ON => Cold reboot
=> bring back, pull and insert back the DSCXL2 card. If server power off / on...

Restart = Reload = Reboot => # shutdown -r +2 or # init 6 or # reboot => Warm reboot
shutdown -r +2 => r=restart +2= wait 2 minutes; during the 2 min. can abort with "Ctrl C"
# last -x|grep -e shutdown -e reboot ==> History of restarts occurred...
or only # last | more

Restart Services e.g.:VM's => # service openais stop or start or restart


# service nnnnnnn status => stop or start or restart

Restart of Portal: # service webservice stop (do on the active running adp -. processor)
# service webservice start (can cause Linux-host/entire both servers restart;
if system was not running clean !! )
or use only # service webservice restart
or also # crm resource restart rsc4k_webservice

Restart of VM Assistant/CSTA: # virsh shutdown Assistant/CSTA ( entire VM and all its resources)

# service network stop => a restart on SWU will occur as eth0 goes down...
# service network start => or if you're on /etc/init.d/ => ./network restart

The list of services nnnnnn are on /etc/init.d/.....

OM-dp2A:/etc/init.d # ls
........ boot.swap network skeleton.compat
apache2 boot.sysctl network-remotefs slpd
apcupsd boot.sysstat nfs smartd
apcupsd_configure boot.udev nfsserver smb
atd boot.udev_retry nmb smbfs
auditd cla nscd snmpd
autofs cron ntp soco2
autoyast cups openais spamd
bluez-coldplug dbus openct splash
boot.apparmor drbd openwsmand sshd
boot.bios_dscxl earlysyslog pcscd sysinfod
boot.cleanup ebtables plt_upgrade syslog
boot.clock fbset pm-profiler tmuxd
boot.crypto frontpanel postfix tunnelbroker
boot.crypto-early frontpanel_dbus postgresql unfsd
boot.cycle gpm powerd uuidd
boot.d haldaemon powerfail vmblock
boot.ksm jexec rc4.d watchdog
boot.ldconfig joystic webservice ........

#############################################################

10
XI. SW - Apps - Install / Manipulations:
RPM: - Recursive Package Manager.
# rpm -qa | less => -query -all = list all installed packages; |less = stop per page
linux:~ # rpm -qa AS* => list ASsistant packages
OM-dp2A:~ # rpm -qi cla => query installed version
Name : cla Relocations: /opt
Version : v1 Vendor: Siemens Enterprise Communications GmbH
Release : r25.1.0 Build Date: Fri Mar 8 03:29:46 2013
# rpm -ihv file.rpm => -install -hash mark for progress "###.." -verbose (detailed output)
# rpm -Uhv file.rpm => -Upgrade /* prefered command also for install as -i does not check exist package.
# rpm -ev package => -erase

Example:
linux:/ # rpm -qa ASt*
AStao-07.100-0012
AStska-07.100-0001

linux:/ # rpm -ev AStska-07.100-0001

linux:/ # rpm -Uhv /opt/siemens/software/HP4K/RPMS/AStska-07.100-0001.i586.rpm


Preparing... ########################################### [100%]
TSKA: adding unit level account ...
1:AStska ########################################### [100%]

TAR: - Tape ARchive = building an archive or extracting (.tgz = tar gzip)


copy the install file to a directory e.g. /home/engr on Assistant
linux:/home/engr # tar -xzvPf file_install_name.tgz
=> x=extract z=unzip v=verbose Pf=Program file

11
XII. Time I have 4 U:
12.1. On Linux-host, display date & time => # date
Example: OM-dp2A:~ # date
Sun Jun 23 09:01:48 CDT 2013 => CDT = Central Daylight Time = (US Central Summer Timezone)
12.2. Changing time directly on Linux-Host command line, if duplex do on both processors:
(If V6R2.15.0, must apply PLT Hot Fix 1, otherwise a system restart occurs when change date !!!)
# date -s 17:25 or
# date -s "YYYY-MM-TT hh:mm:ss"
# date -s "2012-12-31 09:51:24" => date & time. changed
12.3. To change TIMEZONE in Linux; call " # yast " ->System; as figure below on Chapter 12.7.Time with NTP....
12.4. If duplex system, need to do steps above on both DSCXL2 cards.
Remotely, jump from one Linux to other doing:
# ssh root@hostname or # ssh [email protected]
# exit =>to leave ssh far host (yast.ip can be found pressing display button on portal)
12.5. Assistant->Base Administration -> Webmin-> Set TimeZone (this propagates lately to RMX)

12.6. To update the phone display immediately do:


<reg-date; => and send the command result to the system ( in older versions, need to do twice).
e.g.: CHANGE-DATE:WEST,360,DST,60; /* West from Greenwich-UK=> for US-Central Time =CST= - 6 Hours = 360 Minutes;
DST=Daylight Savings Time = 360 - 60 = 300 = -5 Hours on ADP from GMT (Greenwich Meridian Time)
<DIS-DATE;
+-----------------------------+
| THURSDAY |
| DATE: TIME : |
| 2013-09-19 10:06:39 |
| |
| NUMBER OF DAY : 262 |
| DAYLIGHT SAVINGS TIME |
| GMTDIR: WEST TIMEOFFS:360 |
| DSTOFFS:60 |
| REL. DIFF. TO GMT : -300 |
+-----------------------------+

Note: CHANGE-DATE should not be used during high traffic because it forces (beside other things) immediately time-update of all phone-
devices. Several individual messages per device will be generated in the BP and transferred all the way down to the devices. In large PBXs this
will produce a lot of traffic and big load in the BP and in the LTUs. It will take several minutes to process all devices and may interfere with other
CP-activities. (Calls may be delayed ...). If still the same, restart SLMO cards...

Assistant first page; TimeZone showing "! Warning" (below fig.) is corrected with ADP V6 r2.34 Hf4 and V6 r1.HF10

12
12.7. Time with NTP:
NTP is highly recommended as the clock of DSCXL2 has deviation. Do the ntp changes on both linux-host dsxcl2 cards.
Prepare NTP to avoid jumps:
# sntp -r ntp.ip.address => e.g. #sntp -r 172.19.223.99 /* -r eset = sync to NTP server time & date
# hwclock --systoh --noadjfile --utc /* systoh=set the hw clock to the current system time

# yast => to call yast use PuTTY, the assistant->expert mode->ssh gives garbage on blue window display...
if you're on V6R2 go to Portal -> System -> Shell to Host root/hicom #yast
=> System => Date and Time Use Tab Key to jump fields

[X] HW Clock Set to UTC = sync Bios clock on shutdown. Can access DSCXL2 Bios with F4 or Delete key on boot...; F2 on HPA500....
If user changed via Yast->Date&Time -> the option "HW clock set to UTC", then it is mandatory to execute after closing the Yast the following
command from a shell with root access: /sbin/mkinitrd

=> [Synchoronize now]


=> go to [Configure...]

13
12.8. Monitor:
# service ntp status or # ntpq -p...
om-ape25:~ # service ntp status
remote refid st t when poll reach delay offset jitter
==============================================================================
*172.19.208.150 LOCAL(0) 6 u 107 128 377 0.001 39.472 426.915

Interpretation:
The " * " asterisk in front of NTP ip address means:
“ * ” – The remote peer or server presently used as the primary reference.
refid – Where or what the remote peer or server is itself synchronised to;
An IP address – The IP address of a remote peer or server;
.LOCL. – This local host (a place marker at the lowest stratum included in case there are no remote peers or servers available);
.GPS. – American GPS;
.BCST. – broadcast server;
.INIT. – association initialized;
.DENY. – access denied by server;
.TIME. – association timeout;
.STEP. – step time change, the offset is less than the panic threshold (1000ms) but greater than the step threshold (125ms).
The st column shows the stratum of the server, with stratum 1 servers having a local reference such as an atomic clock or, for many servers, a
radio-clock or GPS receiver reference. Most servers you will see are at stratum 2, so they are locked to a stratum-1 server. A lightly loaded
stratum-2 server is probably a better reference than a heavily loaded stratum-1 server such as those with widely-publicised addresses.
t – Type (u: unicast or manycast client, b: broadcast or multicast client, l: local reference clock, s: symmetric peer, A: manycast server, B:
broadcast server, M: multicast server, see “Automatic Server Discovery“);
when – When last polled (seconds ago, “h” hours ago, or “d” days ago);
The poll value should gradually increase from 64 seconds to 1024 seconds as NTP needs to contact the
server less and less frequently as the clock offset and frequency are gradually corrected. Changing the poll
is automatic in NTP.
The reach column should not be 0, and will expand from 1 during the normal working of NTP until it reaches 377. It is an octal display of a bit-
mask showing when the server was reached.
Normally you expect to see 377 in this column against each server.
A column of all zeros means that NTP can't contact any servers - check your firewall settings.
The delay shows the time for a packet from your PC to reach the remote server and vice versa. Values above 150ms may indicate a satellite
circuit and it's best to avoid such servers if possible. You will get best performance from servers which are close to you on the network.
The offset shows how far your PC is off from a nominal UTC, and the value is in milliseconds. So the PC above is within about 1/40s of correct
time!
The jitter column shows how stable the connection between you and the remote server is.

12.9. # service ntp stop # service ntp start or # /etc/init.d/ntpd restart

12.10. # ping ntp.server.ip.addr. /* NTP uses UDP port 123 /*

12.11. logfile => /var/log/ntp

12.12. If wants check configuration:


---------------------------------------------------------------------------------------------------------------
om-ape25:/etc/sysconfig # ls
clock kdump nfs smartmontools
clock.org kernel ntp sound
--------------------------------------------------------------------------------
om-ape25: # cat /etc/ntp.conf
# LCL is unsynchronized
## Add external Servers using
## # rcntp addserver <yourserver>
## Miscellaneous stuff
driftfile /var/lib/ntp/drift/ntp.drift
# path for drift file
logfile /var/log/ntp
# Authentication stuff
keys /etc/ntp.keys
#
server 172.19.208.150

14
XIII. Troubleshoot:
OM-dp2B:~ # w => who what when (only how long the system is up = # uptime )
13:01:58 up 25 days, 19:53, 7 users, load average: 0.61, 0.47, 0.45
USER TTY LOGIN@ IDLE JCPU PCPU WHAT
root tty1 Wed17 2days 0.06s 0.06s -bash
root pts/9 13:01 0.00s 0.04s 0.00s w
root pts/7 08:59 1:56m 0.06s 0.06s -bash

Monitor HP4k Linux Platform:


Display running VM's : # virsh list --all
Display IPDA config # ip route show table TABLE_SOCO2_IPDA
# tail -f var/log/warn => shows warning messages
# tail -f var/log/messages => shows general msgs.
# tail -f /var/log/messages | grep tmux_asd => shows/selected only fan speed msgs.
# crm_mon -1 -f -A => services running
# crm resource status gr4k_webservice => status only on duplex..(simplex=rsc4k_webservice)
# crm resource stop rsc4k_ccap =>stop APE; then use start to reinitialize=reload...

# top => = sar in Unix


OM-dp2A:~ # top => Shift M (show memory allocation)
top - 13:18:31 up 10 days, 21:18, 9 users, load average: 0.78, 0.54, 0.49
Tasks: 237 total, 1 running, 236 sleeping, 0 stopped, 0 zombie
Cpu(s): 17.1%us, 7.1%sy, 0.0%ni, 70.4%id, 5.3%wa, 0.0%hi, 0.1%si, 0.0%st
Mem: 3924828k total, 3730740k used, 194088k free, 49280k buffers
Swap: 16777208k total, 0k used, 16777208k free, 936392k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND


15262 root 20 0 1238m 784m 3396 S 45 20.5 314:33.00 qemu-kvm
21541 root 20 0 766m 527m 3396 S 10 13.8 203:33.98 qemu-kvm
5552 root 20 0 441m 403m 5084 S 1 10.5 58:02.24 java
23900 root 0 -20 448m 308m 11m S 7 8.0 1053:30 qemu-kvm
15725 root 0 -20 375m 300m 11m S 7 7.8 1138:49 qemu-kvm
11691 root 20 0 74324 23m 1800 S 0 0.6 0:53.09 haconfd.pl
3824 root 20 0 259m 21m 4136 S 0 0.6 70:10.19 cla
-------------------------------------------------------------------------------------------------------------------

# ps -ef => process -every -full


# ps aux => process shows all users x status:
VSZ= virtual memory size used
RSS = real memory size used
STAT = status S=Sleeping T=Terminated Z=Zombie R=Running I=iddle
TIME = cpu time used
linux:~ # ps aux
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.0 0.0 736 280 ? S 2012 0:01 init [5]
root 1743 0.0 0.3 4308 2524 ttyS1 Ss+ 2012 0:41 /usr/bin/perl /opt/ha/bin/ha_ser
root 4151 0.0 0.1 2308 880 pts/0 T 12:24 0:00 less
wwwrun 5928 0.0 0.3 158080 12768 ? S Jan11 0:00 /usr/sbin/httpd
root 16369 0.0 0.0 0 0 ? Z 2012 0:00 [checkForNS] <defunct>
root 30288 0.0 0.9 15532 7000 ? Ssl 2012 0:00 ./ComWinAccess
root 31120 0.0 2.1 21772 16472 ? Ss 2012 0:13 /opt/cm/sad/bin/dbwrite

linux:~ # ps axjf => job file = where the PID comes from....

linux:~ # lsof | grep TSKA => list open file | search word "TSKA"
TSKA_Star 6515 tska cwd DIR 253,3 4096 277748 /opt/tska/bin
TSKA_Star 6515 tska txt REG 253,3 93483 277983 /opt/tska/bin/TSKA_Starter
TSKA_Star 6515 tska 0u IPv4 13872 TCP *:9980 (LISTEN)
TSKA_Star 6515 tska 2w CHR 1,3 2010 /dev/null
TSKA_Star 6515 tska 5r REG 253,3 0 51520 /opt/procm/cnfg/DB_LockFilelii

15
# kill PID => = #kill -15 = SIGTERM , termination signal allows to remove temporary files created.
# kill -9 PID => -9=no mercy => Process IDentification killed immediately.
# kill -9 16369 => properly for Halloween...16369 -> Stat => Z as zombie
------------------------------------------------------------------------------------------------------------------------------

Sniffer functions: (tethereal or. tshark)


# tethereal => wireshark trace on specific IP address...

# tethereal -n -ieth0 host 172.19.208.140 -w /tmp/Moriyatrace.pcap


Sniffer trace is running...
-n = no name lookups -i = interface eth0 -w = write to file /tmp/MoriyaTrace.pcap
Stop with: " Ctrl C "

can save on ringbuffer of 5 files filesize 5MByte filename /trace.........pcap


# tethereal -ni eth0 host 172.19.208.140 -a filesize:5000 -b files:5 -w /Moriyatrace.pcap

V6R2; install wireshark package to call tethereal:


OM-dp2A:~ # rpm -Uvh /var/opt/soco2/installrepo/wireshark-1.0.5-1.34.1.x86_64.rpm

Wireshark changed inside OS4k V7 (by Nathan Hughes), internal rpm is now at
# find / -name wireshark*
./opt/soco/rpm/wireshark
./opt/soco/rpm/wireshark/wireshark-1.0.5-1.24.x86_64.rpm
After copy it over to the /var/opt/soco2/installrepo/ directory and installing it:
# rpm -Uvh /var/opt/soco2/installrepo/wireshark-1.0.5-1.34.1.x86_64.rpm

When I run it to the screen it will capture between 30 and 70 packets and then stop itself each time.
# tethereal -n -ieth0 host <ip.address.of.host>
But if I use the –w switch and write it to a file it seems to work fine.
# tethereal -n -ieth0 host <ip.address.of.host> -w <file_name> -S

------------------------------------------------------------------------------------------------------------------------------------------

HP4k V6R2 WebService not coming up (from Release Note):


- Can be detected as follows:
1. check first with crm_mon
when the rsc4k_webservice appeared
Failed actions:
rsc4k_webservice_monitor_30000 (node=dscxl2-3, call=495605, rc=7, status=complete): not running

2. check the webservice log with:


# tail -f /var/log/webservice/webservice.log => general view
# tail -f /var/log/webservice/webservice.log | grep "Unable to obtain resource actions" => specific view

If during a period of ca. 10 Minutes this message appeares more than 1 time, then the problem exists and the
webservice rpm should be installed as follows:
# rpm -Uhv --force /var/opt/soco2/current_hotfix_rpms/webservice-6.2-1.i586.rpm
---------------------------------------------------------------------------------------------------------------------------------------

16
Separated duplex: node can be switched administratively to standalone mode
#standalone_operation enable Other options: disable and status

Remove Platform lock


/bin/sshr -c host_intl deleteLock -f -i SWA
...
Remove hanging SWA.lock
rm -f /var/opt/Assistant/data/SWS/lock/SWA.lock => on Linux-host
rm -f /.AS/SWS/lock/SWA.lock => on Linux-Assistant

-------------------------------------------------------------------------------------------------------------------------------------
The information provided in this document contains descriptions or characteristics of performance which in case of actual use do not always apply as described
or which may change as a result of further development of the products.
Availability and technical specifications are subject to change without notice.
An obligation to provide the respective characteristics or support and warranty shall only exist if expressly agreed in the terms of contract.
Neither the author nor Unify shall be liable for errors, omissions or damages resulting from the use of the informations contained herein..
The comments expressed belong to the author and are not necessarily those of Unify Inc.
OpenScape,OpenStage and HiPath are registered trademarks of Unify.
All other company, brand, product and service names are trademarks or registered trademarks of their respective holders.

17

You might also like