- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- How can i monitor my apps?
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-04-2005 09:06 PM
тАО09-04-2005 09:06 PM
How can i monitor my apps?
What i want to get is the number of memory and cpu-time the apps used ,quite be similar with what "top " command outputs.
Now , I'm wondering wether there are any system API I can use in my developing.
Thanx.
- Tags:
- Monitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-04-2005 09:09 PM
тАО09-04-2005 09:09 PM
Re: How can i monitor my apps?
- Tags:
- sar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-05-2005 03:23 PM
тАО09-05-2005 03:23 PM
Re: How can i monitor my apps?
There are some other examples in the file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-05-2005 04:04 PM
тАО09-05-2005 04:04 PM
Re: How can i monitor my apps?
sar gives the CPU usage
vmstat gives the memory usage.
If u r just looking at each process then top output should be best to capture.
Awk the required output and put in while loop...
- Tags:
- vmstat
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-05-2005 08:00 PM
тАО09-05-2005 08:00 PM
Re: How can i monitor my apps?
Man glance for more info and take a look at the expample under:
/opt/perf/examples/
HTH,
Art
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-05-2005 08:35 PM
тАО09-05-2005 08:35 PM
Re: How can i monitor my apps?
this is an example about how to monitor 'java'.
You have to wrirte a syntax file:
#u_print_head="PRINT_HEAD"
u_print_head="Y"
u_headers_printed=u_headers_printed
if u_headers_printed==0 and u_print_head=="Y" then {
u_max_cpu_pct=100*gbl_active_cpu
print "# User CPU Util Cum Disk Thd"
print "#Process Name PID PPID Pri Name ( ",u_max_cpu_pct|4|0,"% max) CPU IO Rate RSS Cnt"
print "#------------ ------ ------ --- -------- ------------ -------- --------- ------- ---"
u_headers_printed = 1
} # endif
#
print "# ",
gbl_statdate,
" ",
gbl_stattime,
" C=",
gbl_cpu_total_util|3|0,
" D=",
gbl_disk_util_peak|3|0,
" M=",
gbl_mem_util|3|0,
" S=",
gbl_swap_space_util|3|0
#
process loop {
# if proc_proc_name == "PROC_NAME" then {
if proc_proc_name == "java" then {
print proc_proc_name|13," ",
proc_proc_id|6," ",
proc_parent_proc_id|6," ",
proc_pri|3," ",
proc_user_name|8," ",
proc_cpu_total_util|4|1,"/",
proc_cpu_total_util_cum|4|1," ",
proc_cpu_total_time_cum|8|1," ",
proc_disk_phys_io_rate|4|1,"/",
proc_disk_phys_io_rate_cum|4|1," ",
proc_mem_res|7|1," ",
proc_thread_count|3|0
} # endif
} # end process loop
and after monitor the appl:
glance -j10 -adviser_only -iterations 2 -syntax ./gln_proc_template_syntax_file
this is the output:
# User CPU Util Cum Disk Thd
#Process Name PID PPID Pri Name ( 800% max) CPU IO Rate RSS Cnt
#------------ ------ ------ --- -------- ------------ -------- --------- ------- ---
# 09/06/05 10:32:23 C= 18 D= 18 M= 60 S= 41
java 2501 1 168 root 0.0/ 0.4 17745.8 0.0/ 0.1 89.6mb 51
java 15252 15250 168 equinox 0.0/ 2.4 830.6 0.0/ 0.0 436.1mb 83
java 4500 1 154 priceeng 6.8/ 4.9 207.6 0.0/ 0.0 173.3mb 103
# 09/06/05 10:32:33 C= 12 D= 6 M= 60 S= 41
java 2501 1 168 root 1.6/ 0.4 17745.9 0.0/ 0.1 89.6mb 51
java 15252 15250 168 equinox 3.9/ 2.4 831.0 0.0/ 0.0 436.1mb 83
java 4500 1 168 priceeng 2.5/ 4.9 207.9 0.0/ 0.0 173.3mb 103
HTH,
Art
- Tags:
- glance