Archive

Author Archive

December 5, 2008 janaka077 Leave a comment

Only for Solaris Users

This commands are very helpful when you need to debug your application or If you want to monitor application performances.

System and process monitoring commands

  • prstat
  • ptree
  • pstack
  • pkill
  • pmap
  • pfiles

prstat

prstat is a process statistic monitoring utility. It shows CPU utilization, memory usage, user, process ID and few other information of each process.

Example:
$ prstat

PID USERNAME SIZE RSS STATE PRI NICE TIME CPU PROCESS/NLWP
28465 ex19 46M 44M sleep 59 0 0:17:22 0.3% WSA/1
21861 ex19 67M 50M sleep 59 0 0:17:23 0.3% SHU/1
28385 ex19 120M 101M sleep 59 0 0:15:08 0.2% OrderC/5
4420 ex7 141M 121M sleep 59 0 0:01:29 0.2% FDriver_/4
21784 ex19 12M 11M sleep 59 0 0:14:44 0.2% SGA/1
17050 ex7 120M 96M sleep 59 0 0:03:24 0.2% Orche/5
16684 ex7 18M 16M sleep 59 0 0:02:50 0.2% SGA/1
17413 ex7 121M 97M sleep 59 0 0:03:17 0.2% Iate/4
28433 ex19 41M 17M sleep 59 0 0:11:17 0.2% ServiceD/4
17470 ex7 9160K 7712K sleep 59 0 0:02:09 0.2% SSM/1
3952 ex20 9160K 7860K sleep 59 0 0:00:37 0.2% SSM/1
17214 ex7 25M 20M sleep 59 0 0:02:13 0.2% Sequr/3
28536 ex19 7912K 6464K sleep 59 0 0:10:17 0.2% SSM/1
Total: 13 processes, 575 lwps, load averages: 4.31, 4.32, 4.31

If you need to view information of selected process. You can do by giving process ID.

Example:

$ prstat –p 28465
PID USERNAME SIZE RSS STATE PRI NICE TIME CPU PROCESS/NLWP
28465 ex19 46M 44M sleep 59 0 0:17:22 0.3% WSA/1

Total: 1 processes, 575 lwps, load averages: 4.31, 4.32, 4.31

ptree

This command shows parent-child relation ship of running processes. When it execute with out any argument then it shows information of all process. If process id is specified then it only shows information regarding that process.

Example:

With out Process ID:
$ptree
7 /lib/svc/bin/svc.startd
258 /usr/lib/saf/sac -t 300
290 /usr/lib/saf/ttymon
270 /usr/lib/saf/ttymon -g -d /dev/console -l console -m ldterm,ttcompat -h -p v20z
9 /lib/svc/bin/svc.configd
109 /usr/lib/sysevent/syseventd
306 /usr/sbin/cron
3119 sh -c chmod 755 $HOME/run_prstat; ./run_prstat
3127 /bin/bash ./run_prstat
11381 prstat -n 50 -c 5
11382 sleep 5
307 /usr/lib/inet/inetd start
16055 /bin/sh /lib/svc/method/rpc-ttdbserverd
16065 /usr/openwin/bin/rpc.ttdbserverd
115 /usr/sbin/in.telnetd
118 -bash

With Process ID:

$ ptree 22961
301 /usr/lib/ssh/sshd
21571 /usr/lib/ssh/sshd
21578 /usr/lib/ssh/sshd
21580 -ksh
22961 /opt/filebench/bin/filebench
22962 shadow -a shadow -i 1 -s ffffffff10000000 -m /var/tmp/fbench9Ca
22963 shadow -a shadow -i 2 -s ffffffff10000000 -m /var/tmp/fbench9Ca
22964 shadow -a shadow -i 3 -s ffffffff10000000 -m /var/tmp/fbench9Ca
22965 shadow -a shadow -i 4 -s ffffffff10000000 -m /var/tmp/fbench9Ca

pstack

The stacks of all or specific threads within a process can be displayed with the pstack command. This is very help full when you developing multithreaded applications.

Example:
$ pstack 23154
23154: shadow -a shadow -i 193 -s ffffffff10000000 -m /var/tmp/fbench9Cai2S
—————– lwp# 1 / thread# 1 ——————–
ffffffff7e7ce0f4 lwp_wait (2, ffffffff7fffe9cc)
ffffffff7e7c9528 _thrp_join (2, 0, 0, 1, 100000000, ffffffff7fffe9cc) 38
0000000100018300 threadflow_init (ffffffff3722f1b0, ffffffff10000000, 10006a658, 0, 0, 1000888b0) 184
00000001000172f8 procflow_exec (6a000, 10006a000, 0, 6a000, 5, ffffffff3722f1b0) 15c
0000000100026558 main (a3400, ffffffff7ffff948, ffffffff7fffeff8, a4000, 0, 1) 414
000000010001585c _start (0, 0, 0, 0, 0, 0) 17c
—————- lwp# 2 / thread# 2 ——————–
000000010001ae90 flowoplib_hog (30d40, ffffffff651f3650, 30d40, ffffffff373aa3b8, 1, 2e906) 68
00000001000194a4 flowop_start (ffffffff373aa3b8, 0, 1, 0, 1, 1000888b0) 408
ffffffff7e7ccea0 _lwp_start (0, 0, 0, 0, 0, 0)

pkill

The pkill command provides a convenient way to send signals to a list or processes matching certain criteria.

Example:

$ pkill a.out

pmap

The pmap command inspects a process, displaying every mapping within the process’s address space. The amount of resident, nonshared anonymous, and locked memory is shown for each mapping. This allows you to estimate shared and private memory usage.

Example:
$ pmap -x 102908
102908: sh
Address Kbytes Resident Anon Locked Mode Mapped File
00010000 88 88 – – r-x– sh

00036000 8 8 8 – rwx– sh
00038000 16 16 16 – rwx– [ heap ]
FF260000 16 16 – – r-x– en_.so.2
FF272000 16 16 – – rwx– en_US.so.2
FF280000 664 624 – – r-x– libc.so.1
FF336000 32 32 8 – rwx– libc.so.1
FF360000 16 16 – – r-x– libc_psr.so.1
FF380000 24 24 – – r-x– libgen.so.1
FF396000 8 8 – – rwx– libgen.so.1
FF3A0000 8 8 – – r-x– libdl.so.1
FF3B0000 8 8 8 – rwx– [ anon ]
FF3C0000 152 152 – – r-x– ld.so.1
FF3F6000 8 8 8 – rwx– ld.so.1
FFBFE000 8 8 8 – rw— [ stack ]
——– —– —– —– ——
total Kb 1072 1032 56 -

pfiles

All opened file descriptors of a process can be list by pfiles command.(All disk files, Sockets, and other IO devices)

Example:
$ pfiles 21571
21571: /usr/lib/ssh/sshd
Current rlimit: 256 file descriptors
0: S_IFCHR mode:0666 dev:286,0 ino:6815752 uid:0 gid:3 rdev:13,2
O_RDWR|O_LARGEFILE
/devices/pseudo/mm@0:null
1: S_IFCHR mode:0666 dev:286,0 ino:6815752 uid:0 gid:3 rdev:13,2
O_RDWR|O_LARGEFILE
/devices/pseudo/mm@0:null
2: S_IFCHR mode:0666 dev:286,0 ino:6815752 uid:0 gid:3 rdev:13,2
O_RDWR|O_LARGEFILE
/devices/pseudo/mm@0:null
3: S_IFCHR mode:0000 dev:286,0 ino:38639 uid:0 gid:0 rdev:215,2
O_RDWR FD_CLOEXEC
/devices/pseudo/crypto@0:crypto
4: S_IFIFO mode:0000 dev:294,0 ino:13099 uid:0 gid:0 size:0
O_RDWR|O_NONBLOCK FD_CLOEXEC
5: S_IFDOOR mode:0444 dev:295,0 ino:62 uid:0 gid:0 size:0
O_RDONLY|O_LARGEFILE FD_CLOEXEC door to nscd[89]
/var/run/name_service_door
6: S_IFIFO mode:0000 dev:294,0 ino:13098 uid:0 gid:0 size:0
O_RDWR|O_NONBLOCK FD_CLOEXEC

Referances:
http://www.solarisinternals.com

Categories: Uncategorized

Object Orientated Databases

March 10, 2008 janaka077 1 comment

                    Traditional relation databases create big “Impedance mismatch ” with present object oriented development platforms, So some people try to develop different types of Object-to-Relational techniques to fill the gap between Object-Oriented Application and RDMS (Relational Database Management Systems ). But those can not make it in a efficient way.

Another community try it in a different way that is Object–oriented Data bases. Now it becomes a new trend in IT Industry.

Let’s make a quick look on that,

Products Currently Available for Industry usages,

 

1.       ObjectivityDB                             - http://.wwwobjectivity.com

2.       DB4Objects (open source)                      - http://www.db4o.com

3.       VOSS                                                   - http://voss.logicarts.com

4.       Caché®                                                - http://www.intersystems.com

5.       Progress® ObjectStore® Enterprise        - http://www.progress.com

6.       EyeDB                                                  - http://www.eyedb.org

7.       Versant                                     - http://www.versant.com

8.       JDOInstruments  (Open soruce)  - http://www.jdoinstruments.org

9.       JYD Object Database                 - http://www.jyd.com

10.   Ozone                                                   - http://www.ozone-db.org

11.   JODB                                                    - http://www.java-objects-database.com

12.   ODABA                                                 - www.run-software.com

13.   ObjectDB                                              - http://www.objectdb.com

14.   Orient                                                   - http://www.orientechnologies.com

 

 

 

1.       ObjectivityDB  - http://.wwwobjectivity.com

·         Support for distributed databases

·         Massive Scalability (Terabytes)

·         Support platforms     : Solaris , Windows NT, 2000 and XP

·         ODBC Driver also available.

·         Provide High Performance ACID Transaction management (Atomic Consistency Integrity Durability  )

·         Support development platforms : C++ ,Java, Python, Smalltalk

·         Invested in innovation  :  Adobe Systems

·         Trial version available(60 days)

·         Price (90 days Evaluation) : $249.

 (Price of Full version can collect by mailing to  product owners )

 

2.       DB4Objects (open source)- http://www.db4o.com

·         Release under the GPL license and Commercial License

·         Support for .NET and JAVA Developers

·         Easy Object Replication and Synchronization.

·         Price: ( db4o Developer Network (Limited Support) ) : $1,200             

 Full Support version: $ 18,000

·         Customers  And partners : Ricoh(leading maker of digital office solutions), Boeing , Merrill Lynch

 

3.       VOSS   - http://voss.logicarts.com

·         ACID transactions with logging and roll-forward crash recovery

·         Dual Licensing – Open Source GPL and Supported Commercial

·         Concurrent background & foreground garbage collection

·         Automatic object locking and transaction retry on time-out

 

4.       Cache ® – http://www.intersystems.com

·         Can use with JAVA, .NET and  C++.

·         Provide a Performance Monitoring API

·         Use Transactional Bit-Map Indexing for Fast response to complex queries

 

5.       ObjectStore ® Enterprise – http://www.progress.com

·         For  JAVA and C++ Developers

·         Speedy transaction rates and low latencies via patented Cache-Forward Architecture™.

·         Operate on Windows, Solaris and Linux.

 

6.       EyeDB  - http://www.eyedb.org

·         Operate on Sun Solaris , Mac , Linux

·          Can use member and methods in classes

·         Open source project

·         Support for Object Query Language (OQL) and Object Definition Language (ODL)

·         Available for JAVA and C++ Developments

·         Support for multi-dimensional and variable size dimensional arrays

 

 

7.       Versant- http://www.versant.com

·         Support for JAVA and C++

·         Operate in Windows, Sun Salaries , Red Hat Platforms

·         fast database backup/restore without affecting the server availability

·         Roll-Forward archiving

 

8.       JDOInstruments  - http://www.jdoinstruments.org

·         Developed under GPL license

·         embedded object oriented database

·         Only support fro JAVA

 

 

9.       JYD Object Database   - http://www.jyd.com

·         Automatic movement of objects between primary and secondary storage

·         distributed database support

·          garbage collection on the database

·         Price (Professional edition with site License ): $ 19,999

 

10.   Ozone - http://www.ozone-db.org

·         Compliant DOM implementation and ODMG (Object Data Management Group)

·         A Open source Project has been started as a research project.

 

11.   JODB  - http://www.java-objects-database.com

·         Open source product.

·         Support for ACID transactions

·         Data backup functionality

·         Data file lock to avoid concurrent modifications by different processes.

 

12.   ODABA – www.run-software.com

·         Support for Distributed Database Architecture

·         A Free and Open source product.

·         Provide interfaces for Java , C++.

·         Project started in 1994

 

 

 

 

 

 

 

13.   ObjectDB- http://www.objectdb.com

·         Three Edition avalible(Free ,Embedded, server )

·         Pure java database

 

 

14.   Orient- http://www.orientechnologies.com

·         Support for  JAVA , C++ ,SQL

·         Release  for free, under the Apache 2.0 license.

 

 


Categories: Uncategorized