Creation Zone

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Saturday, 2 April 2005

Solaris: Useful Commands - 1

Posted on 02:48 by Unknown
pargs
___________________________

Prints process arguments, environment variables; pargs can examine both processes and their core files

eg.,
% ps -eaf | grep mozilla-bin
techno 11723 11704 0 22:05:35 ? 2:51
/usr/sfw/bin/../lib/mozilla/mozilla-bin -UILocale en-US -contentLocale US

% pargs 11723
11723: /usr/sfw/bin/../lib/mozilla/mozilla-bin -UILocale en-US -contentLocale US
argv[0]: /usr/sfw/bin/../lib/mozilla/mozilla-bin
argv[1]: -UILocale
argv[2]: en-US
argv[3]: -contentLocale
argv[4]: US

% pargs -e 11723
11723: /usr/sfw/bin/../lib/mozilla/mozilla-bin -UILocale en-US -contentLocale US
envp[0]: AB_CARDCATALOG=/usr/dt/share/answerbooks/C/ab_cardcatalog
envp[1]: ADDON_PATH=/usr/sfw/bin/../lib/mozilla
envp[2]: DISPLAY=:0.0
envp[3]: DTAPPSEARCHPATH=/export/home/techno/.dt/appmanager:/etc/dt/appconfig/appmanager/%L:
/etc/dt/appconfig/appmanager/C:/usr/dt/appconfig/appmanager/%L:/usr/dt/appconfig/appmanager/C
envp[4]: DTDATABASESEARCHPATH=/export/home/techno/.dt/types,/etc/dt/appconfig/types/
%L,/etc/dt/appconfig/types/C,/usr/dt/appconfig/types/%L,/usr/dt/appconfig/types/C
envp[5]: DTDEVROOT=
envp[6]: DTSOURCEPROFILE=true
envp[7]: DTUSERSESSION=techno-unknown-0
envp[8]: DTXSERVERLOCATION=local
...

svcs
___________________________

Reports status of service(s); useful for debugging service issues

svcs with -x option, displays the states of services which:
  • are enabled, but not running
  • are preventing another enabled service from running

-v option along with -x, displays verbose information

eg.,
% svcs -x
svc:/application/print/server:default (LP print server)
State: disabled since Tue Mar 22 01:51:18 2005
Reason: Disabled by an administrator.
See: http://sun.com/msg/SMF-8000-05
See: lpsched(1M)
Impact: 2 dependent services are not running. (Use -v for list.)

% svcs -xv
svc:/application/print/server:default (LP print server)
State: disabled since Tue Mar 22 01:51:18 2005
Reason: Disabled by an administrator.
See: http://sun.com/msg/SMF-8000-05
See: man -M /usr/share/man -s 1M lpsched
Impact: 2 dependent services are not running:
svc:/application/print/rfc1179:default
svc:/application/print/ipp-listener:default

-a option, displays all services including the offline/disabled ones

eg.,
% svcs -a
STATE STIME FMRI
legacy_run Mar_22 lrc:/etc/rcS_d/S50sk98sol
legacy_run Mar_22 lrc:/etc/rc2_d/S20sysetup
legacy_run Mar_22 lrc:/etc/rc2_d/S40llc2
disabled Mar_22 svc:/network/dhcp-server:default
disabled Mar_22 svc:/network/ipfilter:default
disabled Mar_22 svc:/network/security/kadmin:default
online Mar_22 svc:/system/filesystem/minimal:default
online Mar_22 svc:/system/rmtmpfiles:default
online Mar_22 svc:/system/keymap:default
online Mar_22 svc:/system/name-service-cache:default
offline Mar_22 svc:/application/print/ipp-listener:default
offline Mar_22 svc:/application/print/rfc1179:default

-p option lists processes associated with each service instance

eg.,
% svcs -p network/telnet:default
STATE STIME FMRI
online Mar_22 svc:/network/telnet:default


svcadm
___________________________

Services can be enabled/disabled with svcadm

Lets check the state of ftp server, and enable/disable it depending on its current state
% svcs -p network/ftp:default
STATE STIME FMRI
online Mar_22 svc:/network/ftp:default

% ftp localhost
Connected to localhost.
220 unknown FTP server ready.
Name (localhost:techno): techno
331 Password required for techno.
Password:
^C

Since FTP server is up, let's disable the service using svcadm command

eg.,
% svcadm disable /network/ftp

% svcs -p network/ftp:default
STATE STIME FMRI
disabled 2:12:04 svc:/network/ftp:default

% ftp localhost
ftp: connect to address 127.0.0.1: Connection refused
Trying ::1...
ftp: connect: Network is unreachable
ftp> bye

It is very easy to enable the service again with svcadm

% svcadm enable /network/ftp

% svcs -p network/ftp:default
STATE STIME FMRI
online 2:14:08 svc:/network/ftp:default

At this point, though the ftp service is available, no processes are associated with the service instance. If we "ftp localhost" from another window, we can then see the ftp daemon:

% svcs -p network/ftp:default
STATE STIME FMRI
online 2:14:08 svc:/network/ftp:default
2:16:27 11976 in.ftpd

smc
___________________________

Solaris Management Console, a Graphical User Interface (GUI) that provides access to Solaris system administration tools.
This tool is comparable to YaST2 of SuSE Linux Or X-Configs of RedHat

pfiles
___________________________

Reports fstat() & fcntl() information for all open files in a process, including their paths

eg.,
% ps -eaf | grep xchat
techno 7958 7945 12 Mar 28 pts/4 361:05 xchat
root 12022 11958 0 02:31:05 pts/4 0:00 grep xchat

% pfiles 7958
7958: xchat
Current rlimit: 256 file descriptors
0: S_IFCHR mode:0620 dev:270,0 ino:12582924 uid:100 gid:7 rdev:24,4
O_RDWR|O_LARGEFILE
/devices/pseudo/pts@0:4
1: S_IFCHR mode:0620 dev:270,0 ino:12582924 uid:100 gid:7 rdev:24,4
O_RDWR|O_LARGEFILE
/devices/pseudo/pts@0:4
2: S_IFCHR mode:0620 dev:270,0 ino:12582924 uid:100 gid:7 rdev:24,4
O_RDWR|O_LARGEFILE
/devices/pseudo/pts@0:4
3: S_IFDOOR mode:0444 dev:279,0 ino:59 uid:0 gid:0 size:0
O_RDONLY|O_LARGEFILE FD_CLOEXEC door to nscd[104]
/var/run/name_service_door
4: S_IFSOCK mode:0666 dev:276,0 ino:37799 uid:0 gid:0 size:0
O_RDWR|O_NONBLOCK FD_CLOEXEC
SOCK_STREAM
SO_SNDBUF(16384),SO_RCVBUF(5120)
sockname: AF_UNIX
peername: AF_UNIX /tmp/.X11-unix/X0
5: S_IFSOCK mode:0666 dev:276,0 ino:45917 uid:0 gid:0 size:0
O_RDWR|O_NONBLOCK
SOCK_STREAM
SO_SNDBUF(49152),SO_RCVBUF(49152)
6: S_IFSOCK mode:0666 dev:276,0 ino:27017 uid:0 gid:0 size:0
O_RDWR|O_NONBLOCK
SOCK_STREAM
SO_REUSEADDR,SO_SNDBUF(49152),SO_RCVBUF(49152)
sockname: AF_INET 0.0.0.0 port: 4000
7: S_IFREG mode:0600 dev:102,7 ino:1237 uid:100 gid:1 size:8435712
O_RDONLY|O_LARGEFILE
/export/home/techno/Siebel77_on_Solaris10.sxw

isainfo
___________________________

Describes the underlying instruction set architecture

isainfo prints the name(s) of the native instruction sets for applications supported by the current version of the operating system.

With -v option, we can find out whether 64-bit applications are supported, or whether the running kernel uses 32-bit or 64-bit device drivers

eg.,
% isainfo
i386

% isainfo -v
32-bit i386 applications
sse2 sse fxsr mmx cmov sep cx8 tsc fpu

who
___________________________

-b option, shows the time and date of the last reboot

eg.,
% who -b
. system boot Mar 22 01:51


-r can be used to get the current run level of the init process
% who -r
. run-level 3 Mar 22 01:51 3 0 S

with -d option, who displays all processes that have expired and not been respawned by init. The exit field appears for dead processes and contains the termination and exit values of the dead process. This can be useful in determining why a process terminated.

# who -dH
NAME LINE TIME
techno pts/5 Mar 25 00:58
techno pts/7 Mar 28 00:05
techno pts/8 Mar 27 19:19
techno pts/6 Apr 2 02:08 (localhost)

uptime
___________________________

Shows how long the system has been up

uptime command prints the current time, the length of time the system has been up, and the average number of jobs in the run queue over the last 1, 5 and 15 minutes

eg.,
% uptime
2:47am up 11 day(s), 57 min(s), 1 user, load average: 0.14, 0.15, 0.17
Email ThisBlogThis!Share to XShare to Facebook
Posted in | No comments
Newer Post Older Post Home

0 comments:

Post a Comment

Subscribe to: Post Comments (Atom)

Popular Posts

  • *nix: Workaround to cannot find zipfile directory in one of file.zip or file.zip.zip ..
    Symptom: You are trying to extract the archived files off of a huge (any file with size > 2 GB or 4GB, depending on the OS) ZIP file with...
  • JDS: Installing Sun Java Desktop System 2.0
    This document will guide you through the process of installing JDS 2.0 on a PC from integrated CDROM images Requirements I...
  • Linux: Installing Source RPM (SRPM) package
    RPM stands for RedHat Package Manager. RPM is a system for installing and managing software & most common software package manager used ...
  • Solaris: malloc Vs mtmalloc
    Performance of Single Vs Multi-threaded application Memory allocation performance in single and multithreaded environments is an important a...
  • C/C++: Printing Stack Trace with printstack() on Solaris
    libc on Solaris 9 and later, provides a useful function called printstack , to print a symbolic stack trace to the specified file descripto...
  • Installing MySQL 5.0.51b from the Source Code on Sun Solaris
    Building and installing the MySQL server from the source code is relatively very easy when compared to many other OSS applications. At least...
  • Oracle Apps on T2000: ORA-04020 during Autoinvoice
    The goal of this brief blog post is to provide a quick solution to all Sun-Oracle customers who may run into a deadlock when a handful of th...
  • Siebel Connection Broker Load Balancing Algorithm
    Siebel server architecture supports spawning multiple application object manager processes. The Siebel Connection Broker, SCBroker, tries to...
  • 64-bit dbx: internal error: signal SIGBUS (invalid address alignment)
    The other day I was chasing some lock contention issue with a 64-bit application running on Solaris 10 Update 1; and stumbled with an unexpe...
  • Oracle 10gR2/Solaris x64: Fixing ORA-20000: Oracle Text errors
    First, some facts: * Oracle Applications 11.5.10 (aka E-Business Suite 11 i ) database is now supported on Solaris 10 for x86-64 architectur...

Categories

  • 80s music playlist
  • bandwidth iperf network solaris
  • best
  • black friday
  • breakdown database groups locality oracle pmap sga solaris
  • buy
  • deal
  • ebiz ebs hrms oracle payroll
  • emca oracle rdbms database ORA-01034
  • friday
  • Garmin
  • generic+discussion software installer
  • GPS
  • how-to solaris mmap
  • impdp ora-01089 oracle rdbms solaris tips upgrade workarounds zombie
  • Magellan
  • music
  • Navigation
  • OATS Oracle
  • Oracle Business+Intelligence Analytics Solaris SPARC T4
  • oracle database flashback FDA
  • Oracle Database RDBMS Redo Flash+Storage
  • oracle database solaris
  • oracle database solaris resource manager virtualization consolidation
  • Oracle EBS E-Business+Suite SPARC SuperCluster Optimized+Solution
  • Oracle EBS E-Business+Suite Workaround Tip
  • oracle lob bfile blob securefile rdbms database tips performance clob
  • oracle obiee analytics presentation+services
  • Oracle OID LDAP ADS
  • Oracle OID LDAP SPARC T5 T5-2 Benchmark
  • oracle pls-00201 dbms_system
  • oracle siebel CRM SCBroker load+balancing
  • Oracle Siebel Sun SPARC T4 Benchmark
  • Oracle Siebel Sun SPARC T5 Benchmark T5-2
  • Oracle Solaris
  • Oracle Solaris Database RDBMS Redo Flash F40 AWR
  • oracle solaris rpc statd RPC troubleshooting
  • oracle solaris svm solaris+volume+manager
  • Oracle Solaris Tips
  • oracle+solaris
  • RDC
  • sale
  • Smartphone Samsung Galaxy S2 Phone+Shutter Tip Android ICS
  • solaris oracle database fmw weblogic java dfw
  • SuperCluster Oracle Database RDBMS RAC Solaris Zones
  • tee
  • thanksgiving sale
  • tips
  • TomTom
  • windows

Blog Archive

  • ►  2013 (16)
    • ►  December (3)
    • ►  November (2)
    • ►  October (1)
    • ►  September (1)
    • ►  August (1)
    • ►  July (1)
    • ►  June (1)
    • ►  May (1)
    • ►  April (1)
    • ►  March (1)
    • ►  February (2)
    • ►  January (1)
  • ►  2012 (14)
    • ►  December (1)
    • ►  November (1)
    • ►  October (1)
    • ►  September (1)
    • ►  August (1)
    • ►  July (1)
    • ►  June (2)
    • ►  May (1)
    • ►  April (1)
    • ►  March (1)
    • ►  February (1)
    • ►  January (2)
  • ►  2011 (15)
    • ►  December (2)
    • ►  November (1)
    • ►  October (2)
    • ►  September (1)
    • ►  August (2)
    • ►  July (1)
    • ►  May (2)
    • ►  April (1)
    • ►  March (1)
    • ►  February (1)
    • ►  January (1)
  • ►  2010 (19)
    • ►  December (3)
    • ►  November (1)
    • ►  October (2)
    • ►  September (1)
    • ►  August (1)
    • ►  July (1)
    • ►  June (1)
    • ►  May (5)
    • ►  April (1)
    • ►  March (1)
    • ►  February (1)
    • ►  January (1)
  • ►  2009 (25)
    • ►  December (1)
    • ►  November (2)
    • ►  October (1)
    • ►  September (1)
    • ►  August (2)
    • ►  July (2)
    • ►  June (1)
    • ►  May (2)
    • ►  April (3)
    • ►  March (1)
    • ►  February (5)
    • ►  January (4)
  • ►  2008 (34)
    • ►  December (2)
    • ►  November (2)
    • ►  October (2)
    • ►  September (1)
    • ►  August (4)
    • ►  July (2)
    • ►  June (3)
    • ►  May (3)
    • ►  April (2)
    • ►  March (5)
    • ►  February (4)
    • ►  January (4)
  • ►  2007 (33)
    • ►  December (2)
    • ►  November (4)
    • ►  October (2)
    • ►  September (5)
    • ►  August (3)
    • ►  June (2)
    • ►  May (3)
    • ►  April (5)
    • ►  March (3)
    • ►  February (1)
    • ►  January (3)
  • ►  2006 (40)
    • ►  December (2)
    • ►  November (6)
    • ►  October (2)
    • ►  September (2)
    • ►  August (1)
    • ►  July (2)
    • ►  June (2)
    • ►  May (4)
    • ►  April (5)
    • ►  March (5)
    • ►  February (3)
    • ►  January (6)
  • ▼  2005 (72)
    • ►  December (5)
    • ►  November (2)
    • ►  October (6)
    • ►  September (5)
    • ►  August (5)
    • ►  July (10)
    • ►  June (8)
    • ►  May (9)
    • ▼  April (6)
      • C/C++: Functions with variable numbers of arguments
      • Solaris: Fixing sound card woes
      • Solaris: Recovering from a Runtime Linker Failure -2
      • Sun C/C++ compilers: Inlining routines
      • Solaris Linker: -B {static | dynamic}
      • Solaris: Useful Commands - 1
    • ►  March (6)
    • ►  February (5)
    • ►  January (5)
  • ►  2004 (36)
    • ►  December (1)
    • ►  November (5)
    • ►  October (12)
    • ►  September (18)
Powered by Blogger.

About Me

Unknown
View my complete profile