Solaris Command:
Version of Solaris:
# uname -r
5.10
#Determine whether package installed or not
# pkginfo -i SUNWarc
system SUNWarc Lint Libraries (usr)
# pkginfo -i SUNWsprox
ERROR: information for "SUNWsprox" was not found
# prtconf|grep "Memory size"
Memory size: 536 Megabytes
# /usr/sbin/swap -s
total: 218988k bytes allocated + 55636k reserved = 274624k used, 721404k available
# /bin/isainfo -kv
32-bit i386 kernel modules
Enable Network Card:
Enable the network card
#ifconfig e1000g0 plumb
Then issue the ifconfig -a Command
#ifconfig e1000g0 192.168.0.106 netmask 255.255.255.0 up
#ifconfig -a
Configuring Virtual interface
#ifconfig e1000g0:1 172.40.30.4 netmask 255.255.0.0 up
SSH Configuration User Equivalence Failed:
Workaround:
#mkdir -p /usr/local/bin
# ln -s /usr/bin/ssh /usr/local/bin
# ln -s /usr/bin/scp /usr/local/bin
Showing posts with label Unix. Show all posts
Showing posts with label Unix. Show all posts
Thursday, July 28, 2011
Wednesday, October 22, 2008
How to Identify OS 64 bit or 32 bit
Check whether OS is 64 bit or 32 bit.
-----------------------------------------
On Solaris,
SQL> !/usr/bin/isainfo -kv
64-bit amd64 kernel modules
SQL> !/usr/bin/isainfo -v
64-bit amd64 applications
cx16 mon sse3 pause sse2 sse fxsr mmx cmov amd_sysc cx8 tsc fpu
32-bit i386 applications
cx16 mon sse3 pause sse2 sse fxsr mmx cmov sep cx8 tsc fpu
This output tells us that solaris operating systems allow co-existence of 32-bit and 64-bit files.
On AIX,
$ getconf -a | grep KERN
$ file /usr/lib/boot/unix*
On Linux,
On HP-UX,
/usr/bin/ getconf KERNEL_BITS
/usr/bin/file /stand/vmunix
Linux:
getconf LONG_BIT
gives 32/64 bit..
though it's common sense that 64 bit os cannot sit on 32 bit proc , x86 in uname -m are indication of 32 bit processor rahter than kernel
On linux,
$uname -a
Linux debian 2.6.18-4-686 #1 SMP Wed May 9 23:03:12 UTC 2007 i686 GNU/Linux
If the output is x86_64 then 64-bit and i686 or similar for 32-bit.
On windows,
Start>All Programs>accessories> System Tools>System Information>look for under System summary.
Or start>run>dixdiag>Then check for WHQL digital signature.
-----------------------------------------
On Solaris,
SQL> !/usr/bin/isainfo -kv
64-bit amd64 kernel modules
SQL> !/usr/bin/isainfo -v
64-bit amd64 applications
cx16 mon sse3 pause sse2 sse fxsr mmx cmov amd_sysc cx8 tsc fpu
32-bit i386 applications
cx16 mon sse3 pause sse2 sse fxsr mmx cmov sep cx8 tsc fpu
This output tells us that solaris operating systems allow co-existence of 32-bit and 64-bit files.
On AIX,
$ getconf -a | grep KERN
$ file /usr/lib/boot/unix*
On Linux,
On HP-UX,
/usr/bin/ getconf KERNEL_BITS
/usr/bin/file /stand/vmunix
Linux:
getconf LONG_BIT
gives 32/64 bit..
though it's common sense that 64 bit os cannot sit on 32 bit proc , x86 in uname -m are indication of 32 bit processor rahter than kernel
On linux,
$uname -a
Linux debian 2.6.18-4-686 #1 SMP Wed May 9 23:03:12 UTC 2007 i686 GNU/Linux
If the output is x86_64 then 64-bit and i686 or similar for 32-bit.
On windows,
Start>All Programs>accessories> System Tools>System Information>look for under System summary.
Or start>run>dixdiag>Then check for WHQL digital signature.
Friday, July 18, 2008
Useful Unix Commands and Scripts for DBA's
Find/Zip/Move/Delete files older than x days
find ./ -name "*.ARC" -mtime +1 -exec ls -l {} \;
find ./ -name "*.ARC" -mtime +1 -exec rm {} \;
find ./ -name "*.ARC" -mtime +1 -exec gzip {} \;
find ./ -name "*.arch" -mtime +1 -exec mv {} /u01/andy/;
Delete the 500 oldest files
rm -f `ls -trhead -500`
Find and grep
find ./ -exec grep -l "string" {} \;
Check all logs for ORA- errors
grep ^ORA- *log cut -f2 -d"-"cut -f1 -d:awk '{print "ORA-" $1}'sort -u
INODE:
ls -latri
find . -inum-print;
find . inum \ -exec -exec rm -i {} \;
How to remove whitespace in file from vi editor
:%s/[ctrl+v ctrl+m]//g
Get Oracle HOME from oratab:
cat /etc/oratabegrep ':N:Y'grep -v \*cut -f2 -d':'
Resync Command:
rsync -e ssh -Pazv /u01/app/oracle/admin/slice/arch/ oracle@test1:/u01/app/oracle/admin/slice/arch/
Error:
***An error occured during the file system check
***Dropping you to a shell, the system will reboot
***When you leave the shell
Give root password for maintenance
Or type Control-D to continue:
Solution:
#Give root password
#mount -o remount,rw /
#comment in /etc/fstab file
Create New Filesystem:
find ./ -name "*.ARC" -mtime +1 -exec ls -l {} \;
find ./ -name "*.ARC" -mtime +1 -exec rm {} \;
find ./ -name "*.ARC" -mtime +1 -exec gzip {} \;
find ./ -name "*.arch" -mtime +1 -exec mv {} /u01/andy/;
Delete the 500 oldest files
rm -f `ls -trhead -500`
Find and grep
find ./ -exec grep -l "string" {} \;
Check all logs for ORA- errors
grep ^ORA- *log cut -f2 -d"-"cut -f1 -d:awk '{print "ORA-" $1}'sort -u
INODE:
ls -latri
find . -inum
find . inum \
How to remove whitespace in file from vi editor
:%s/[ctrl+v ctrl+m]//g
Resync Command:
rsync -e ssh -Pazv /u01/app/oracle/admin/slice/arch/ oracle@test1:/u01/app/oracle/admin/slice/arch/
Error:
***An error occured during the file system check
***Dropping you to a shell, the system will reboot
***When you leave the shell
Give root password for maintenance
Or type Control-D to continue:
Solution:
#Give root password
#mount -o remount,rw /
#comment in /etc/fstab file
Create New Filesystem:
mkfs -t ext3 /dev/sde1
mkdir /software
mount -t ext3 /dev/sdb1 /software
add following line on /etc/fstab
/dev/sdb1 /software ext3 defaults 1 1
Subscribe to:
Posts (Atom)