Kmaiti

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

Thursday, 30 December 2010

Flow diagram of systemtap debugging scripting tool?

Posted on 00:19 by Unknown



===========================
What is systemtap?


Ans : Scripting tool to debug and monitor the whole system processes or any events.

How to install it on linux machine ?


Ans :
yum install kernel-devel
yum install kernel-debuginfo
yum install systemtap

Tool to do the job :

Ans : stap

Syntax to use it :


-------------
probe {handler}

Where event is kernel.function, process.statement, timer.ms, begin, end etc

and handler can be filtering/control statement and
helper function : log, printf, pid etc
-------------

Example :


[root@vm80 systamexample]# cat hellworld.stp
probe begin
{
print("This is hello world\n")
exit()
}

[root@vm80 systamexample]

Execution :


[root@vm80 systamexample]# stap hellworld.stp
This is hello world
[root@vm80 systamexample]#

[root@vm80 systamexample]# cat primecheck.stp
function isprime (x) {
if (x < 2) return 0
for (i = 2; i < x; i++) {
if (x % i == 0) return 0
if (i * i > x) break
}
return 1
}

probe begin {
for (i = 0; i < 50; i++)
if (isprime (i)) printf("%d\n", i)
exit()
}


stap-authorize-signing-cert stap-report
[root@vm80 systamexample]# stap primecheck.stp
2
3
5
7
11
13
17
19
23
29
31
37
41
43
47
[root@vm80 systamexample]#
==============================

Try :)
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Posted in | No comments
Newer Post Older Post Home

0 comments:

Post a Comment

Subscribe to: Post Comments (Atom)

Popular Posts

  • [a fatal error or timeout occurred while processing this directive] + cpanel
    Guys, Just check the cpanel log file and you'll get the clue from there. I got following messages : execute : tail -f /usr/local/cpanel/...
  • How to access the webalizer from the outside of the cpanel?
    Guys, I don't want to post this type of article since you'll get it from the Google. But still I did. I followed following steps : E...
  • WHM + http showing failed ?
    Guys, Please check the log of the apache server like : 1. tail -f /usr/local/apache/logs/error_log 2. check the http port in /usr/local/apac...
  • How to enable php in apache on RHEL ?
    1. In order to enable php engine in apache, you should make sure php is installed in the system first. Then refer following steps : locate l...
  • Addition, multiplication etc in bash script?
    ======== #!/bin/bash x=5 # initialize x to 5 y=3 # initialize y to 3 add=$(($x + $y)) # add the values of x and y and assign it to va...
  • How do I determine if my x86-compatible Intel system is multi-processor, multi-core or supports hyperthreading?
    Guys, We need to know about multi-processor, multi-core or supports hyperthreading. Here are the details : Physical ID (Physical processor o...
  • make: *** [install-webconf] Error 1
    Guys, I got this error message during configuring the nagios : Here is the exact error message. ======= root@server [/usr/local/src/nagios-3...
  • How to install phpshield on 32 or 64 bit linux machine?
    Guys, phpSHIELD protects your PHP Source Code with a powerful, easy to use encoder, which creates a native bytecode version of the script an...
  • NDMP communication failure error
    Guys, Issue : Netbackup server sends alert NDMP communication failure once everyday. But there is no issue to run scheduled backup jobs. Env...
  • CISCO UCS makes easy to manage IT setup and provides optimized usage of resources
    CISCO has launched UCS (unified computing system) few years back and this makes really easy to manage IT environment. CISCO UCS 5k chassis (...

Categories

  • ACL
  • ESX
  • Linux
  • Storage
  • UCS

Blog Archive

  • ►  2013 (5)
    • ►  May (1)
    • ►  April (3)
    • ►  February (1)
  • ►  2012 (10)
    • ►  July (1)
    • ►  June (1)
    • ►  April (1)
    • ►  March (3)
    • ►  February (3)
    • ►  January (1)
  • ►  2011 (86)
    • ►  December (3)
    • ►  November (2)
    • ►  September (19)
    • ►  August (9)
    • ►  July (5)
    • ►  June (9)
    • ►  May (12)
    • ►  April (3)
    • ►  March (4)
    • ►  February (5)
    • ►  January (15)
  • ▼  2010 (152)
    • ▼  December (9)
      • unable connect to socket: No route to host (113)
      • How to install frysk on linux rhel5?
      • Flow diagram of systemtap debugging scripting tool?
      • How to remotely access the linux desktop from any ...
      • How to install luci and ricci for managing the clu...
      • How to configure a High Availability Cluster (Hear...
      • How to configure autofs with NFS4?
      • How to install and configure NFSv4 server and clie...
      • Which desktop is used by my linux machine?
    • ►  November (34)
    • ►  October (20)
    • ►  September (14)
    • ►  August (24)
    • ►  July (19)
    • ►  June (3)
    • ►  May (25)
    • ►  April (3)
    • ►  January (1)
Powered by Blogger.