OSwatcher is a collection of UNIX shell scripts intended to collect and archive operating system and network metrics to aid support in diagnosing performance issues. OSW operates as a set of background processes on the server and gathers OS data on a regular basis, invoking such Unix utilities as vmstat, netstat and iostat.
For installation as below :
root@MYSERVER #
-rw-r--r-- 1 root root 962560 Oct 9 08:58 oswbb511_B.tar
root@MYSERVER # tar -xvf oswbb511_B.tar
x oswbb, 0 bytes, 0 tape blocks
x oswbb/src, 0 bytes, 0 tape blocks
x oswbb/src/tombody.gif, 4175 bytes, 9 tape blocks
x oswbb/src/Thumbs.db, 10240 bytes, 20 tape blocks
x oswbb/src/missing_graphic.gif, 8694 bytes, 17 tape blocks
x oswbb/src/OSW_profile.htm, 21678 bytes, 43 tape blocks
x oswbb/src/watch.gif, 5621 bytes, 11 tape blocks
x oswbb/src/coe_logo.gif, 2994 bytes, 6 tape blocks
x oswbb/src/oswbba_input.txt, 135 bytes, 1 tape blocks
x oswbb/tmp, 0 bytes, 0 tape blocks
x oswbb/headers, 0 bytes, 0 tape blocks
x oswbb/tarupfiles.sh, 138 bytes, 1 tape blocks
x oswbb/Exampleprivate.net, 1730 bytes, 4 tape blocks
x oswbb/vtop.sh, 1090 bytes, 3 tape blocks
x oswbb/vmsub.sh, 598 bytes, 2 tape blocks
x oswbb/docs, 0 bytes, 0 tape blocks
x oswbb/docs/The_Analyzer, 0 bytes, 0 tape blocks
x oswbb/docs/The_Analyzer/OSWbba_README.txt, 17590 bytes, 35 tape blocks
x oswbb/docs/The_Analyzer/OSW_Black_Box_Analyzer_Overview.pdf, 393822 bytes, 770 tape blocks
x oswbb/docs/The_Analyzer/OS_Watcher_Black_Box_Analyzer_User_Guide.pdf, 65364 bytes, 128 tape blocks
x oswbb/docs/OSWatcher_Black_Box, 0 bytes, 0 tape blocks
x oswbb/docs/OSWatcher_Black_Box/OSW_bb_README.txt, 9386 bytes, 19 tape blocks
x oswbb/docs/OSWatcher_Black_Box/OSWatcher_Black_Box_User_Guide.pdf, 136884 bytes, 268 tape blocks
x oswbb/topaix.sh, 439 bytes, 1 tape blocks
x oswbb/topsub.sh, 545 bytes, 2 tape blocks
x oswbb/OSWatcher.sh, 29496 bytes, 58 tape blocks
x oswbb/pssub.sh, 547 bytes, 2 tape blocks
x oswbb/nfssub.sh, 740 bytes, 2 tape blocks
x oswbb/mpsub.sh, 542 bytes, 2 tape blocks
x oswbb/oswrds.sh, 825 bytes, 2 tape blocks
x oswbb/profile, 0 bytes, 0 tape blocks
x oswbb/oswsub.sh, 524 bytes, 2 tape blocks
x oswbb/oswnet.sh, 351 bytes, 1 tape blocks
x oswbb/htop.sh, 834 bytes, 2 tape blocks
x oswbb/OSWatcherFM.sh, 4424 bytes, 9 tape blocks
x oswbb/analysis, 0 bytes, 0 tape blocks
x oswbb/startOSWbb.sh, 1629 bytes, 4 tape blocks
x oswbb/oswlnxio.sh, 655 bytes, 2 tape blocks
x oswbb/gif, 0 bytes, 0 tape blocks
x oswbb/oswlnxtop.sh, 820 bytes, 2 tape blocks
x oswbb/oswib.sh, 414 bytes, 1 tape blocks
x oswbb/stopOSWbb.sh, 542 bytes, 2 tape blocks
x oswbb/oswbba.jar, 200168 bytes, 391 tape blocks
x oswbb/locks, 0 bytes, 0 tape blocks
x oswbb/iosub.sh, 743 bytes, 2 tape blocks
x oswbb/xtop.sh, 1404 bytes, 3 tape blocks
root@MYSERVER #
root@MYSERVER # ./startOSWbb.sh
root@MYSERVER #
Info...You did not enter a value for snapshotInterval.
Info...Using default value = 30
Info...You did not enter a value for archiveInterval.
Info...Using default value = 48
Setting the archive log directory to/opt/oswbb/archive
Testing for discovery of OS Utilities...
VMSTAT found on your system.
IOSTAT found on your system.
MPSTAT found on your system.
NETSTAT found on your system.
./OSWatcher.sh: top: not found
PRSTAT found on your system.
Testing for discovery of OS CPU COUNT
OSWbb is looking for the CPU COUNT on your system
CPU COUNT will be used by oswbba to automatically look for cpu problems
CPU COUNT found on your system.
CPU COUNT = 64
Discovery completed.
Starting OSWatcher Black Box v5.1.1 on Wed Oct 9 09:09:58 WIT 2013
With SnapshotInterval = 30
With ArchiveInterval = 48
OSWatcher Black Box - Written by Carl Davis, Center of Expertise,
Oracle Corporation
For questions on install/usage please go to MOS (Note:301137.1)
If you need further assistance or have comments or enhancement
requests you can email me Carl.Davis@Oracle.com
Data is stored in directory: /opt/oswbb/archive
Starting Data Collection...
oswbb heartbeat:Wed Oct 9 09:10:03 WIT 2013
oswbb heartbeat:Wed Oct 9 09:10:33 WIT 2013
oswbb heartbeat:Wed Oct 9 09:11:03 WIT 2013
root@MYSERVER # ps -ef | grep osw
root 29462 29269 0 09:10:03 pts/4 0:00 /bin/sh ./OSWatcherFM.sh 48 /opt/oswbb/archive
root 6052 28358 0 09:33:05 pts/5 0:00 grep osw
root@MYSERVER # pwd
/opt/oswbb/archive
root@MYSERVER # ls -ltr
total 14
drwxr-xr-x 2 root root 512 Oct 9 09:09 oswprvtnet
drwxr-xr-x 2 root root 512 Oct 9 09:10 oswvmstat
drwxr-xr-x 2 root root 512 Oct 9 09:10 oswmpstat
drwxr-xr-x 2 root root 512 Oct 9 09:10 oswnetstat
drwxr-xr-x 2 root root 512 Oct 9 09:10 oswiostat
drwxr-xr-x 2 root root 512 Oct 9 09:10 oswtop
drwxr-xr-x 2 root root 512 Oct 9 09:10 oswps
root@MYSERVER #
Read More..
Saturday, October 12, 2013
Thursday, September 12, 2013
How to use XPINFO
What is xpinfo?
xpinfo is tools to provides a mapping between the device file(s) on server and the associated port and ldev on the SureStore E XP Disk Array. By default, this utility will provide a name cross reference of all luns connected to the array.
How to use?
[root@myserver]# ./xpinfo --help Usage: xpinfo -[tuv] -[l|p] -[i|c|m|h|r|d[char]|z|n] [-f raw_device] [-X [raw_device]] -D
[root@myserver ~ ]# ./xpinfo -v 
LINUX Xpinfo,v 22.00.00 2011-06-29
[root@myserver ~ ]# ./xpinfo -il > /root/outputgw.txt
[root@myserver ~ ]# ls -ltr | grep outputgw.txt
-rw-r--r-- 1 root root 23523 Sep 12 06:19 outputgw.txt
[root@myserver ~ ]# more outputgw.txt
Device File ALPA Tgt Lun Port CU:LDev Type Serial#
================================================================================
/dev/sdke 00 06 00 CL2A 01:00 OPEN-V 00029642
/dev/sdkf 00 05 00 CL1A 01:00 OPEN-V 00029642
/dev/sdkc 00 05 00 CL1N 01:00 OPEN-V 00029642
/dev/sdkd 00 07 00 CL2N 01:00 OPEN-V 00029642
... truncated ...
Manual for XPINFO ?
NAME
xpinfo - Enhanced SCSI Inquiry for SureStore E XP Disk Array
SYNOPSIS
xpinfo -[tu] [-v] -[l|p] -[i|c|h|m|r|d[char]] [-f raw_device]
DESCRIPTION
xpinfo provides a mapping between the device file(s) on HP-UX and the
associated port and ldev on the SureStore E XP Disk Array. By
default, this utility will provide a name cross reference of all luns
connected to the array.
Options
-c Displays Continuous Access and Business Copy volume
designation information. Data fields include: subsystem
number, CT group number, CA volume designation, and BC
volume designation for each of the three MU numbers.
-d[char]
Displays a single line of data per logical device.
Each data field is delimited by a comma or by 'char' if
specified. The ordering of the data fields is as follows:
device_file, target_id, LUN_id, port_id, CU:LDev, type,
device_size, serial#, code_rev, subsystem, CT_group, CA_vol,
BC0_vol, BC1_vol, BC2_vol, ACP_pair, RAID_level, RAID_group,
disk1, disk2, disk3, disk4, model, port_WWN, ALPA.
Fields for which the data is either not available or not
applicable for the device are displayed as "---".
-f raw_device
Report information only for the specified logical device.
By default (-f not specified), this tool will report on
all "OPEN" type devices.
-h Displays this help message.
-i Displays identification information. Data fields
include: ALPA, target id, LUN id, port id, LDev number,
LUN type (product id) and serial number.
-l Sort output by LDev number.
-m Displays model information. Data fields include:
model id, emulation type, size, serial number and
firmware revision.
-p Sort output by Port number.
-r Displays RAID configuration information. Data fields
include: ACP pair number, RAID level, RAID group, and
disk mechanisms.
-t Display Target, Lun, CU and LDev id's in decimal format.
The default is to display in hexadecimal format.
-u Create report using updated ioscan list. By default, the
report is created using the kernel image of the last ioscan.
-v Display xpinfo version. The -v option has precedence over
all other options. If the -v option is specified along with
other output options, only the xpinfo revision is displayed.
By default, (options i,c,m,r,d not specified) xpinfo will display in
verbose format.
EXAMPLES
The following command will provide a mapping of the disk device file
c20t7d2
xpinfo -f /dev/rdsk/c116t2d1
which results in the following output:
Device File : /dev/rdsk/c116t2d1 Model : XP512
Port : CL2C Serial # : 00030057
Host Target : 02 Code Rev : 0116
Array LUN : 11 Subsystem : 0004
CU:LDev : 00:11 CT Group : ---
Type : OPEN-3 CA Volume : SMPL
Size : 2347 MB BC0 (MU#0) : SMPL
ALPA : da BC1 (MU#1) : SMPL
Loop Id : 07 BC2 (MU#2) : SMPL
SCSI Id : --- RAID Level : RAID5
FC-LUN : 4011000000000000 RAID Group : 1-2
Port WWN : 500060e802756912 ACP Pair : 1
Disk Mechs : R101 R111 R121 R131
This is the verbose format output, which includes all data gathered
for the device.
Note:
1. If the LUN is not paired for Async, then the CT Group number
is displayed as "---".
2. For Fibre Channel attach LUNs the Target field provides the
FC-AL Loop ID and the LUN field provides the FCP_LUN ID.
3. Fields for which the data is either not available or not
applicable for the device are displayed as "---". Read More..
Tuesday, September 10, 2013
virtual box VERR_LDR_MISMATCH_NATIVE Windows 7
Today i have upgraded virtualbox from Virtual Box V 4.2.12 to Virtual Box V 4.2.18,but there appears error below :
" VERR_LDR_MISMATCH_NATIVE "
Solution : the answer appears to be found by going to C:\USERS\\AppData\Local\VirtualStore\Program Files
and then rmdir /s Oracle
source :
https://forums.virtualbox.org/viewtopic.php?f=6&t=34542
Read More..
Solution : the answer appears to be found by going to C:\USERS\
Monday, February 11, 2013
How to upgrade JDK ( Java Development Kit) solaris 10
Version existing : jdk1.5.0_34 need to be upgraded to version : jdk1.6.0_24.
1. Donwload 2 files :
a. jdk-6u24-solaris-sparcv9.tar.Z
b. jdk-6u24-solaris-sparc.tar.Z
source :
http://www.oracle.com/technetwork/java/javase/install-solaris-64-138849.html
2. Extract files
# pwd
/export/home/gandevtuna
# cd x64
# gunzip jdk-6u24-solaris-sparcv9.tar.Z
# tar -xf jdk-6u24-solaris-sparcv9.tar
# ls -ltr
total 54262
drwxr-xr-x 4 admin other 512 Feb 3 2011 SUNWj6rtx
drwxr-xr-x 4 admin other 512 Feb 3 2011 SUNWj6dvx
drwxr-xr-x 4 admin 143 512 Feb 3 2011 SUNWj6dmx
-rw-r----- 1 root root 27753472 Feb 11 14:49 jdk-6u24-solaris-sparcv9.tar
# pwd
/export/home/gandevtuna
# cd x32
# gunzip jdk-6u24-solaris-sparc.tar.Z
# tar -xf jdk-6u24-solaris-sparc.tar
# ls -ltr
total 478536
drwxrwxr-x 4 admin other 512 Feb 3 2011 SUNWjavadb-demo
drwxrwxr-x 4 admin other 512 Feb 3 2011 SUNWjavadb-core
drwxrwxr-x 4 admin other 512 Feb 3 2011 SUNWjavadb-common
drwxrwxr-x 4 admin other 512 Feb 3 2011 SUNWjavadb-client
drwxrwxr-x 4 admin other 512 Feb 3 2011 SUNWjavadb-service
drwxrwxr-x 4 admin other 512 Feb 3 2011 SUNWjavadb-javadoc
drwxrwxr-x 4 admin other 512 Feb 3 2011 SUNWjavadb-docs
drwxr-xr-x 4 admin other 512 Feb 3 2011 SUNWj6man
drwxr-xr-x 4 admin other 512 Feb 3 2011 SUNWj6jmp
drwxr-xr-x 4 admin other 512 Feb 3 2011 SUNWj6dmo
drwxr-xr-x 4 admin other 512 Feb 3 2011 SUNWj6dev
drwxr-xr-x 4 admin other 512 Feb 3 2011 SUNWj6cfg
drwxr-xr-x 4 admin other 512 Feb 3 2011 SUNWj6rt
-rw-rw-r-- 1 admin other 76 Feb 3 2011 THIRDPARTYLICENSEREADME.txt
-rw-rw-r-- 1 admin other 20663 Feb 3 2011 README_zh_CN.html
-rw-rw-r-- 1 admin other 25317 Feb 3 2011 README_ja.html
-rw-rw-r-- 1 admin other 28230 Feb 3 2011 README.html
-rw-rw-r-- 1 admin other 3339 Feb 3 2011 COPYRIGHT
-rw-r----- 1 admin other 244785152 Feb 11 14:28 jdk-6u24-solaris-sparc.tar
3. install files
# pkgadd -d . SUNWj6man SUNWj6jmp SUNWj6dmo SUNWj6dev SUNWj6cfg SUNWj6rt
# pkgadd -d . SUNWj6rtx SUNWj6dvx SUNWj6dmx
4. unlink and link those files
# ls -ltr /usr/bin/java
lrwxrwxrwx 1 root other 16 Apr 13 2012 java -> ../java/bin/java
# unlink java
# ln -s /usr/jdk/latest/bin/java /usr/bin/java
# ls -ltr /usr/jdk/
total 12
lrwxrwxrwx 1 root other 7 Apr 13 2012 j2sdk1.4.2_19 -> ../j2se
drwxr-xr-x 8 root bin 512 Apr 13 2012 packages
lrwxrwxrwx 1 root other 18 Apr 29 2012 jdk1.5.0_34 -> instances/jdk1.5.0
lrwxrwxrwx 1 root root 11 Feb 9 21:10 latest -> jdk1.5.0_34
drwxr-xr-x 7 root bin 512 Feb 9 21:28 instances
lrwxrwxrwx 1 root root 18 Feb 9 21:33 jdk1.6.0_24 -> instances/jdk1.6.0
# unlink latest
# ln -s jdk1.6.0_24 latest
# ls -ltr
total 12
lrwxrwxrwx 1 root other 7 Apr 13 2012 j2sdk1.4.2_19 -> ../j2se
drwxr-xr-x 8 root bin 512 Apr 13 2012 packages
lrwxrwxrwx 1 root other 18 Apr 29 2012 jdk1.5.0_34 -> instances/jdk1.5.0
drwxr-xr-x 7 root bin 512 Feb 9 21:28 instances
lrwxrwxrwx 1 root root 18 Feb 9 21:33 jdk1.6.0_24 -> instances/jdk1.6.0
lrwxrwxrwx 1 root root 11 Feb 11 15:08 latest -> jdk1.6.0_24
5. Check the result
Before :
# java -version
java version "1.5.0_34"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_34-b03)
Java HotSpot(TM) Server VM (build 1.5.0_34-b03, mixed mode)
#
After:
# java -version
java version "1.6.0_24"
Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
Java HotSpot(TM) Server VM (build 19.1-b02, mixed mode)
#
6. Done Read More..
1. Donwload 2 files :
a. jdk-6u24-solaris-sparcv9.tar.Z
b. jdk-6u24-solaris-sparc.tar.Z
source :
http://www.oracle.com/technetwork/java/javase/install-solaris-64-138849.html
2. Extract files
# pwd
/export/home/gandevtuna
# cd x64
# gunzip jdk-6u24-solaris-sparcv9.tar.Z
# tar -xf jdk-6u24-solaris-sparcv9.tar
# ls -ltr
total 54262
drwxr-xr-x 4 admin other 512 Feb 3 2011 SUNWj6rtx
drwxr-xr-x 4 admin other 512 Feb 3 2011 SUNWj6dvx
drwxr-xr-x 4 admin 143 512 Feb 3 2011 SUNWj6dmx
-rw-r----- 1 root root 27753472 Feb 11 14:49 jdk-6u24-solaris-sparcv9.tar
# pwd
/export/home/gandevtuna
# cd x32
# gunzip jdk-6u24-solaris-sparc.tar.Z
# tar -xf jdk-6u24-solaris-sparc.tar
# ls -ltr
total 478536
drwxrwxr-x 4 admin other 512 Feb 3 2011 SUNWjavadb-demo
drwxrwxr-x 4 admin other 512 Feb 3 2011 SUNWjavadb-core
drwxrwxr-x 4 admin other 512 Feb 3 2011 SUNWjavadb-common
drwxrwxr-x 4 admin other 512 Feb 3 2011 SUNWjavadb-client
drwxrwxr-x 4 admin other 512 Feb 3 2011 SUNWjavadb-service
drwxrwxr-x 4 admin other 512 Feb 3 2011 SUNWjavadb-javadoc
drwxrwxr-x 4 admin other 512 Feb 3 2011 SUNWjavadb-docs
drwxr-xr-x 4 admin other 512 Feb 3 2011 SUNWj6man
drwxr-xr-x 4 admin other 512 Feb 3 2011 SUNWj6jmp
drwxr-xr-x 4 admin other 512 Feb 3 2011 SUNWj6dmo
drwxr-xr-x 4 admin other 512 Feb 3 2011 SUNWj6dev
drwxr-xr-x 4 admin other 512 Feb 3 2011 SUNWj6cfg
drwxr-xr-x 4 admin other 512 Feb 3 2011 SUNWj6rt
-rw-rw-r-- 1 admin other 76 Feb 3 2011 THIRDPARTYLICENSEREADME.txt
-rw-rw-r-- 1 admin other 20663 Feb 3 2011 README_zh_CN.html
-rw-rw-r-- 1 admin other 25317 Feb 3 2011 README_ja.html
-rw-rw-r-- 1 admin other 28230 Feb 3 2011 README.html
-rw-rw-r-- 1 admin other 3339 Feb 3 2011 COPYRIGHT
-rw-r----- 1 admin other 244785152 Feb 11 14:28 jdk-6u24-solaris-sparc.tar
3. install files
# pkgadd -d . SUNWj6man SUNWj6jmp SUNWj6dmo SUNWj6dev SUNWj6cfg SUNWj6rt
# pkgadd -d . SUNWj6rtx SUNWj6dvx SUNWj6dmx
4. unlink and link those files
# ls -ltr /usr/bin/java
lrwxrwxrwx 1 root other 16 Apr 13 2012 java -> ../java/bin/java
# unlink java
# ln -s /usr/jdk/latest/bin/java /usr/bin/java
# ls -ltr /usr/jdk/
total 12
lrwxrwxrwx 1 root other 7 Apr 13 2012 j2sdk1.4.2_19 -> ../j2se
drwxr-xr-x 8 root bin 512 Apr 13 2012 packages
lrwxrwxrwx 1 root other 18 Apr 29 2012 jdk1.5.0_34 -> instances/jdk1.5.0
lrwxrwxrwx 1 root root 11 Feb 9 21:10 latest -> jdk1.5.0_34
drwxr-xr-x 7 root bin 512 Feb 9 21:28 instances
lrwxrwxrwx 1 root root 18 Feb 9 21:33 jdk1.6.0_24 -> instances/jdk1.6.0
# unlink latest
# ln -s jdk1.6.0_24 latest
# ls -ltr
total 12
lrwxrwxrwx 1 root other 7 Apr 13 2012 j2sdk1.4.2_19 -> ../j2se
drwxr-xr-x 8 root bin 512 Apr 13 2012 packages
lrwxrwxrwx 1 root other 18 Apr 29 2012 jdk1.5.0_34 -> instances/jdk1.5.0
drwxr-xr-x 7 root bin 512 Feb 9 21:28 instances
lrwxrwxrwx 1 root root 18 Feb 9 21:33 jdk1.6.0_24 -> instances/jdk1.6.0
lrwxrwxrwx 1 root root 11 Feb 11 15:08 latest -> jdk1.6.0_24
5. Check the result
Before :
# java -version
java version "1.5.0_34"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_34-b03)
Java HotSpot(TM) Server VM (build 1.5.0_34-b03, mixed mode)
#
After:
# java -version
java version "1.6.0_24"
Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
Java HotSpot(TM) Server VM (build 19.1-b02, mixed mode)
#
6. Done Read More..
Saturday, January 19, 2013
How to install and use SHC (Generic shell script compiler)
1. Download source shc ( _http://www.datsi.fi.upm.es/~frosal/sources/shc-3.8.7.tgz_ )
SHC * the latest version from that server is shc-3.8.9.tgz *
[root@Redhat6_afgan shc-3.8.7]# pwd
/root/test/shc-3.8.7/shc-3.8.7
[root@Redhat6_afgan shc-3.8.7]#
2. Compile the shc source
[root@Redhat6_afgan shc-3.8.7]# make
cc -Wall -O6 shc.c -o shc
make: cc: Command not found
make: *** [shc] Error 127
[root@Redhat6_afgan shc-3.8.7]#
Check the package gcc already installed or not in system, if there gcc not installed, install that first
[root@Redhat6_afgan shc-3.8.7]#rpm -qa | grep gcc
[root@Redhat6_afgan ~]# rpm -qa | grep gcc
libgcc-4.4.4-13.el6.x86_64
[root@Redhat6_afgan ~]#
[root@Redhat6_afgan shc-3.8.7]# yum install gcc-c++
Loaded plugins: refresh-packagekit, rhnplugin
This system is not registered with RHN.
RHN support will be disabled.
Setting up Install Process
Resolving Dependencies
.... truncated ...
Running Transaction
Installing : mpfr-2.4.1-6.el6.x86_64 1/10
Installing : cpp-4.4.4-13.el6.x86_64 2/10
Installing : ppl-0.10.2-11.el6.x86_64 3/10
Installing : cloog-ppl-0.15.7-1.2.el6.x86_64 4/10
Installing : libstdc++-devel-4.4.4-13.el6.x86_64 5/10
Installing : kernel-headers-2.6.32-71.el6.x86_64 6/10
Installing : glibc-headers-2.12-1.7.el6.x86_64 7/10
Installing : glibc-devel-2.12-1.7.el6.x86_64 8/10
Installing : gcc-4.4.4-13.el6.x86_64 9/10
Installing : gcc-c++-4.4.4-13.el6.x86_64 10/10
Installed:
gcc-c++.x86_64 0:4.4.4-13.el6
Dependency Installed:
cloog-ppl.x86_64 0:0.15.7-1.2.el6 cpp.x86_64 0:4.4.4-13.el6 gcc.x86_64 0:4.4.4-13.el6
glibc-devel.x86_64 0:2.12-1.7.el6 glibc-headers.x86_64 0:2.12-1.7.el6 kernel-headers.x86_64 0:2.6.32-71.el6
libstdc++-devel.x86_64 0:4.4.4-13.el6 mpfr.x86_64 0:2.4.1-6.el6 ppl.x86_64 0:0.10.2-11.el6
Complete!
[root@Redhat6_afgan shc-3.8.7]#
[root@Redhat6_afgan ~]# rpm -qa | grep gcc
gcc-4.4.4-13.el6.x86_64
libgcc-4.4.4-13.el6.x86_64
gcc-c++-4.4.4-13.el6.x86_64
[root@Redhat6_afgan ~]#
After process install gcc was completed,Try again command make the shc
[root@Redhat6_afgan shc-3.8.7]# make
cc -Wall -O6 shc.c -o shc
*** ¿Do you want to probe shc with a test script?
*** Please try... make test
[root@Redhat6_afgan shc-3.8.7]#
[root@Redhat6_afgan shc-3.8.7]# ls -ltr
total 160
-rw-r--r--. 1 root root 17982 May 9 1996 Copying
-rw-r--r--. 1 root root 336 Feb 22 2003 match
-rw-r--r--. 1 root root 1544 Jun 19 2003 shc.README
-rw-r--r--. 1 root root 155 Jun 19 2003 pru.sh
-rw-r--r--. 1 root root 52 Jun 19 2003 test.csh
-rw-r--r--. 1 root root 3136 Jul 8 2004 shc.1
-rw-r--r--. 1 root root 4558 Jul 8 2004 shc.html
-rw-r--r--. 1 root root 138 Nov 13 2004 test.bash
-rw-r--r--. 1 root root 142 Jan 18 2008 test.ksh
-rw-r--r--. 1 root root 24962 Feb 11 2010 shc.c
-rw-r--r--. 1 root root 24962 Feb 11 2010 shc-3.8.7.c
-rw-r--r--. 1 root root 1940 Feb 11 2010 Makefile
-rw-r--r--. 1 root root 3637 Feb 11 2010 CHANGES
-rwxr-xr-x. 1 root root 37173 Jan 19 15:18 shc
[root@Redhat6_afgan shc-3.8.7]#
[root@Redhat6_afgan shc-3.8.7]# make install
*** Installing shc and shc.1 on /usr/local
*** ¿Do you want to continue? y
install -c -s shc /usr/local/bin/
install -c -m 644 shc.1 /usr/local/man/man1/
install: target `/usr/local/man/man1/' is not a directory: No such file or directory
make: *** [install] Error 1
[root@Redhat6_afgan shc-3.8.7]#
please ignore the error above, the shc already linked to /usr/local/bin
3.Create shell script file to do test
[root@Redhat6_afgan shc-3.8.7] # vi afgan.sh
#!/bin/bash
echo "please Call Me AFGAN !!!"
:wq!
[root@Redhat6_afgan shc-3.8.7]#
[root@Redhat6_afgan shc-3.8.7]# chmod +x afgan.sh
[root@Redhat6_afgan shc-3.8.7] # ls -ltr afgan.sh
-rwxr-xr-x. 1 root root 45 Jan 19 17:05 afgan.sh
[root@Redhat6_afgan shc-3.8.7]#
4.Try complie the script using shc
[root@Redhat6_afgan shc-3.8.7]# /usr/local/bin/shc -v -r -T -f afgan.sh
shc shll=bash
shc [-i]=-c
shc [-x]=exec '%s' "$@"
shc [-l]=
shc opts=
shc: cc afgan.sh.x.c -o afgan.sh.x
shc: strip afgan.sh.x
shc: chmod go-r afgan.sh.x
[root@Redhat6_afgan shc-3.8.7]#
[root@Redhat6_afgan shc-3.8.7]# ls -ltr afgan*
-rw-r--r--. 1 root root 45 Jan 19 17:05 afgan.sh
-rw-r--r--. 1 root root 9450 Jan 19 17:08 afgan.sh.x.c
-rwx--x--x. 1 root root 9240 Jan 19 17:08 afgan.sh.x
[root@Redhat6_afgan shc-3.8.7]#
After compile shell script file, shc will create 2 files : afgan.sh.x and afgan.sh.x.c
[root@Redhat6_afgan shc-3.8.7]# file afgan.sh
afgan.sh: Bourne-Again shell script text executable
[root@Redhat6_afgan shc-3.8.7]# file afgan.sh.x.c
afgan.sh.x.c: ASCII C program text
[root@Redhat6_afgan shc-3.8.7]# file afgan.sh.x
afgan.sh.x: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, stripped
[root@Redhat6_afgan shc-3.8.7]#
5. Test running the ooutput file from shc
[root@Redhat6_afgan shc-3.8.7]# pwd
/root/test/shc-3.8.7/shc-3.8.7
[root@Redhat6_afgan shc-3.8.7]# ls -ltr afgan*
-rwxr-xr-x. 1 root root 45 Jan 19 17:05 afgan.sh
-rw-r--r--. 1 root root 9450 Jan 19 17:08 afgan.sh.x.c
-rwx--x--x. 1 root root 9240 Jan 19 17:08 afgan.sh.x
[root@Redhat6_afgan shc-3.8.7]# ./afgan.sh.x
please Call Me AFGAN !!!
[root@Redhat6_afgan shc-3.8.7]#
6. Rename file afgan.sh.x with whatever your needed
[root@Redhat6_afgan shc-3.8.7]# mv afgan.sh.x kicep
[root@Redhat6_afgan shc-3.8.7]# ./kicep
please Call Me AFGAN !!!
[root@Redhat6_afgan shc-3.8.7]#
Friday, November 16, 2012
How to reduce FileSystem LVM in Redhat 6
Here are steps to reduce filesystem in Linux Redhat 6 (please do full backup before your execute reducing filesystem) :
1. Umount Filesystem
[root@RedHat6]# umount /oravl99
2. Fsck that filesystem.
[root@RedHat6]# e2fsck -f /dev/vg_arch/oravl99
e2fsck 1.41.12 (17-May-2010)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/vg_arch/oravl99: 11/131072 files (0.0% non-contiguous), 16821/510976 blocks
3. Resize filesystem. example wanto to reduce 1G for existing filesystem
[root@RedHat6]# resize2fs -p /dev/vg_arch/oravl99 1G
resize2fs 1.41.12 (17-May-2010)
Resizing the filesystem on /dev/vg_arch/oravl99 to 262144 (4k) blocks.
Begin pass 3 (max = 16)
Scanning inode table XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
The filesystem on /dev/vg_arch/oravl99 is now 262144 blocks long.
4. reduce 1Gb on the filesystem
[root@RedHat6]# lvreduce -L 1Gb /dev/vg_arch/oravl99
WARNING: Reducing active logical volume to 1.00 GiB
THIS MAY DESTROY YOUR DATA (filesystem etc.)
Do you really want to reduce oravl99? [y/n]: y
Reducing logical volume oravl99 to 1.00 GiB
Logical volume oravl99 successfully resized
5. Mount Filesystem
[root@RedHat6]# mount /oravl99
6. Check sizing current filesystem
[root@RedHat6]# df -h /oravl99
/dev/mapper/vg_arch-oravl99
1008M 34M 924M 4% /oravl99
[root@RedHat6]#
7. done
Read More..
Thursday, November 15, 2012
How to Extend LVM linux RedHat 6
Here are steps to extend and reduse LVM in Linux Redhat 6
1. Check sizing Volume group that filesystem want to changes
[root@RedHat6]# uname -sr Linux 2.6.32-71.el6.x86_64
[root@RedHat6]# vgs
VG #PV #LV #SN Attr VSize VFree
vg00 1 1 0 wz--n- 1020.00m 0
vgVo 1 1 0 wz--n- 3.41g 0
vg_arch 1 1 0 wz--n- 1.95g 972.00m
vgswap 1 1 0 wz--n- 508.00m 0
[root@RedHat6]#
[root@RedHat6]# vgdisplay vg_arch
--- Volume group ---
VG Name vg_arch
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 2
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 1
Open LV 1
Max PV 0
Cur PV 1
Act PV 1
VG Size 1.95 GiB
PE Size 4.00 MiB
Total PE 499
Alloc PE / Size 256 / 1.00 GiB
Free PE / Size 243 / 972.00 MiB
VG UUID qjyTfj-UMKx-uFDo-L1BE-xf4t-cD9O-myqJC3
[root@RedHat6]#
2. Ok, we have 972Mb free size on vg_arch and then we can add that to filesystem oravl99
[root@RedHat6]# lvs
LV VG Attr LSize Origin Snap% Move Log Copy% Convert
prod vg00 -wi-ao 1020.00m
lvVo vgVo -wi-ao 3.41g
oravl99 vg_arch -wi-ao 1.00g
LSWAP vgswap -wi-ao 508.00m
[root@RedHat6
[root@RedHat6]# lvextend -l +243 /dev/vg_arch/oravl9
Extending logical volume oravl99 to 1.95 GiB
Logical volume oravl99 successfully resized
[root@RedHat6]
===== OR we can use below command =========
[root@RedHat6]# lvextend -L +972M /dev/vg_arch/oravl99
Extending logical volume oravl99 to 1.95 GiB
Logical volume oravl99 successfully resized
[root@RedHat6]#
====================================
[root@RedHat6]# lvs
LV VG Attr LSize Origin Snap% Move Log Copy% Convert
prod vg00 -wi-ao 1020.00m
lvVo vgVo -wi-ao 3.41g
oravl99 vg_arch -wi-ao 1.95g
LSWAP vgswap -wi-ao 508.00m
[root@RedHat6]
3. resizing filesystem oravl99
[root@RedHat6]# resize2fs /dev/vg_arch/oravl99
resize2fs 1.41.12 (17-May-2010)
Filesystem at /dev/vg_arch/oravl99 is mounted on /oravl99; on-line resizing required
old desc_blocks = 1, new_desc_blocks = 1
Performing an on-line resize of /dev/vg_arch/oravl99 to 510976 (4k) blocks.
The filesystem on /dev/vg_arch/oravl99 is now 510976 blocks long.
[root@RedHat6]# df -h /oravl99
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_arch-oravl99
2.0G 34M 1.8G 2% /oravl99
[root@RedHat6]#
4. Done
Read More..
1. Check sizing Volume group that filesystem want to changes
[root@RedHat6]# uname -sr Linux 2.6.32-71.el6.x86_64
[root@RedHat6]# vgs
VG #PV #LV #SN Attr VSize VFree
vg00 1 1 0 wz--n- 1020.00m 0
vgVo 1 1 0 wz--n- 3.41g 0
vg_arch 1 1 0 wz--n- 1.95g 972.00m
vgswap 1 1 0 wz--n- 508.00m 0
[root@RedHat6]#
[root@RedHat6]# vgdisplay vg_arch
--- Volume group ---
VG Name vg_arch
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 2
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 1
Open LV 1
Max PV 0
Cur PV 1
Act PV 1
VG Size 1.95 GiB
PE Size 4.00 MiB
Total PE 499
Alloc PE / Size 256 / 1.00 GiB
Free PE / Size 243 / 972.00 MiB
VG UUID qjyTfj-UMKx-uFDo-L1BE-xf4t-cD9O-myqJC3
[root@RedHat6]#
2. Ok, we have 972Mb free size on vg_arch and then we can add that to filesystem oravl99
[root@RedHat6]# lvs
LV VG Attr LSize Origin Snap% Move Log Copy% Convert
prod vg00 -wi-ao 1020.00m
lvVo vgVo -wi-ao 3.41g
oravl99 vg_arch -wi-ao 1.00g
LSWAP vgswap -wi-ao 508.00m
[root@RedHat6
[root@RedHat6]# lvextend -l +243 /dev/vg_arch/oravl9
Extending logical volume oravl99 to 1.95 GiB
Logical volume oravl99 successfully resized
[root@RedHat6]
===== OR we can use below command =========
[root@RedHat6]# lvextend -L +972M /dev/vg_arch/oravl99
Extending logical volume oravl99 to 1.95 GiB
Logical volume oravl99 successfully resized
[root@RedHat6]#
====================================
[root@RedHat6]# lvs
LV VG Attr LSize Origin Snap% Move Log Copy% Convert
prod vg00 -wi-ao 1020.00m
lvVo vgVo -wi-ao 3.41g
oravl99 vg_arch -wi-ao 1.95g
LSWAP vgswap -wi-ao 508.00m
[root@RedHat6]
3. resizing filesystem oravl99
[root@RedHat6]# resize2fs /dev/vg_arch/oravl99
resize2fs 1.41.12 (17-May-2010)
Filesystem at /dev/vg_arch/oravl99 is mounted on /oravl99; on-line resizing required
old desc_blocks = 1, new_desc_blocks = 1
Performing an on-line resize of /dev/vg_arch/oravl99 to 510976 (4k) blocks.
The filesystem on /dev/vg_arch/oravl99 is now 510976 blocks long.
[root@RedHat6]# df -h /oravl99
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_arch-oravl99
2.0G 34M 1.8G 2% /oravl99
[root@RedHat6]#
4. Done
Read More..
Subscribe to:
Posts (Atom)