Network Information Service Overview NIS - PowerPoint PPT Presentation

1 / 15
About This Presentation
Title:

Network Information Service Overview NIS

Description:

... Trace - tracing execution of processes over a certain period of time. ... Real and non-real time. TRACING LINUX PROCESSES. TECHNOLOGY FOR A FREE WORLD. 14 of 15 ... – PowerPoint PPT presentation

Number of Views:104
Avg rating:3.0/5.0
Slides: 16
Provided by: vishwanat
Category:

less

Transcript and Presenter's Notes

Title: Network Information Service Overview NIS


1
h

h
h
h
h
Tracing Linux Processes Dr. B. Thangaraju
2
Agenda
  • Execution Trace
  • Different Ways of Tracing
  • proc file system
  • Linux Trace Toolkit (LTT)

3
Introduction
  • Debuggers (gdb, kdb and kgdb) are used for
    finding and correcting program errors.
  • Debuggers offers little help in finding any sort
    of problem that involves an applications
    interaction with other applications or with the
    kernel.
  • Execution Trace - tracing execution of processes
    over a certain period of time.

4
Process Tracing
  • A simplest form of tracing involves monitoring
    the interactions between a single application and
    the Linux kernel.
  • The main tool for tracing a single process is
    strace.
  • strace uses the ptrace( ) system call to
    intercept all system calls made by an
    application.
  • It can extract all the system call information
    and present the result in text form.

5
Proc File System
  • proc file system is not stored on the hard disk.
  • It is a virtual filesystem that the kernel
    creates in memory.
  • It is used as an interface to the kernel data
    structures.
  • /proc maintains highly dynamic data on the state
    of the system.
  • mount
  • none on /proc type proc (rw)

6
iostat
  • Report Central Processing Unit (CPU) statistics
    and input/output statistics for devices and
    partitions.
  • The iostat command generates two types of
    reports, the CPU Utilization report and the
    Device Utilization report.
  • Example
  • iostat -d -x 1 1 (for device utilization report)
  • iostat -c 1 1 (for CPU utilization report)

7
sar
  • Collect, Report, or save system activity
    information.
  • sar A
  • It gives statistics about
  • Total number of read/write requests per second
    issued to the physical disk.
  • Number of active/inactive (dirty) pages in memory
  • Number of processes created per second
  • Total number of packets received/transmitted per
    second
  • Number of TCP/UDP/RAW sockets currently in use
  • Run queue length (number of processes waiting for
    run time)
  • Memory statistics
  • etc.,

8
Linux Trace Toolkit
  • strace will trace only one process and present
    the result in text form.
  • To trace many processes in a given period of
    time, Linux Trace Toolkit (LTT) is a better
    choice.
  • LTT is distributed as free software under GPL.
  • Applying an LTT-patch to the corresponding kernel
    enable us to create a module to trace many events.

9
Linux Trace Toolkit
  • LTT is useful for systems administrators for
    analyzing the performance of the system.
  • It is useful for programmers for getting details
    of the interaction between kernel and user-level
    applications.
  • For embedded/real-time programmers for getting
    information about real and non-real-time tasks
    behavior.

10
Trace Points
  • File Systems
  • System call
  • Trap
  • Interrupt
  • Scheduling change
  • Timer
  • Process
  • Memory
  • IPC
  • Socket

11
LTT -components
  • The trace toolkit provides a daemon, which will
    capture the events and write it to disk.
  • To achieve this, LTTs operation is subdivided
    into four software components
  • Kernel Instrumentation
  • Tracing Subsystem
  • Trace Daemon
  • Visualization Tool

12
Data Analysis
  • The provided trace visualizer is used to analyze
    the tracing data in three different forms
  • event graph
  • process analysis
  • raw event descriptions

13
Real and non-real time
14
References
  • http//www.opersys.com/LTT/
  • Examining Process Information, Linux For You,
    January 2004, pp. 84-87.
  • Mastering Linux Debugging Techniques
    (http//www-128.ibm.com/developerworks/linux/libra
    ry/l-debug/?dwzonelinux).
  • Debugging Tools, Chapter 11, Building Embedded
    Linux Systems by Karim Yaghmour
  • Process Tracing with the Linux Trace Toolkit
    (http//www.opersys.com/ftp/pub/LTT/Documentation/
    sys-admin-mag-ltt-2004-11.pdf).
  • Debugging code with strace (http//www.redhat.com/
    magazine/010aug05/features/strace/)

15
  • Thank You
  • balat.raju _at_ wipro.com
Write a Comment
User Comments (0)
About PowerShow.com