SlideShare a Scribd company logo
1 of 8
Using Strace
Tracking System Calls and Signals
What is Strace?
• A system program that traces system calls and
signals of any script or program
• Allows the customization of output to focus on the
area you need to examine
• Quickly see a permissions issue
• Find files that are opened and closed
• Helps to troubleshoot problems
How to use Strace?
• Installation done by running
/scripts/ensurerpm strace or
yum install strace
• Run the command “strace” with several options.
Here are a few examples:
strace -fvs 4096 $(SCRIPT)
f = follow forks
v = verbose output
s = output line size
(the size 4096 give this many characters)
How to use Strace?
• Additional options
• Example of using all useful options
This command will show all system calls and signals of cPanel, WHM or
Webmail UI actions
-o = output goes to this file
-p = process PID to strace
strace -fvs 4096 -o /root/cpservd.strace -p `cat /var/run/cpsrvd.pid`
How to use Strace?
• Advanced Use:
• Calls that can be traced:
strace -e trace=file will trace only file accesses
strace -e trace=network will trace only network activity
strace -e trace=open will trace only open system calls
strace -e trace=!open will trace all system calls except open
strace -e trace=open,close,read,write
strace -e trace=process
strace -e trace=signal
How to read Strace output?
• Strace shows System Calls:
• Strace shows the Signals received (but not where
they came from):
read
write
open
close
stat
fork
connect
getuid
getgid
setuid
setgid
execve
chmod
chown
SIGINT (ex. ctrl-c)
SIGKILL (kill -9)
ENOENT (file or directory not found)
EPERM (permission error) (chmod)
ENOPERM (permission error (chown)
EACCESS if -1 (permission denied)
SIGSEGV (Segmentation fault)
How to read output?
• Once you get the strace output, just view the output
file.
1. Start with the error message. Search through the log file for the error
messages displayed:
Example: 32116 write(1, “There was a problem creating the”, 32)=32
2. Then start scrolling up for the last action resulting in an error before the
error was written to stdout:
Example: 32116 open("/home/scooby/etc/snoopy.com/passwd",
O_WRONLY|O_CREAT|O_APPEND| O_LARGEFILE, 0666) = -1 EACCES
(Permission denied)
Strace will not show:
• Any program logic
• Computation
• Strace is not a debugger

More Related Content

What's hot

Browsing Linux Kernel Source
Browsing Linux Kernel SourceBrowsing Linux Kernel Source
Browsing Linux Kernel SourceMotaz Saad
 
Linux Preempt-RT Internals
Linux Preempt-RT InternalsLinux Preempt-RT Internals
Linux Preempt-RT Internals哲豪 康哲豪
 
Linux kernel architecture
Linux kernel architectureLinux kernel architecture
Linux kernel architectureSHAJANA BASHEER
 
Part 02 Linux Kernel Module Programming
Part 02 Linux Kernel Module ProgrammingPart 02 Linux Kernel Module Programming
Part 02 Linux Kernel Module ProgrammingTushar B Kute
 
Debugging linux kernel tools and techniques
Debugging linux kernel tools and  techniquesDebugging linux kernel tools and  techniques
Debugging linux kernel tools and techniquesSatpal Parmar
 
Geep networking stack-linuxkernel
Geep networking stack-linuxkernelGeep networking stack-linuxkernel
Geep networking stack-linuxkernelKiran Divekar
 
Architecture Of The Linux Kernel
Architecture Of The Linux KernelArchitecture Of The Linux Kernel
Architecture Of The Linux Kernelguest547d74
 
HKG15-311: OP-TEE for Beginners and Porting Review
HKG15-311: OP-TEE for Beginners and Porting ReviewHKG15-311: OP-TEE for Beginners and Porting Review
HKG15-311: OP-TEE for Beginners and Porting ReviewLinaro
 
Introduction to Linux Kernel by Quontra Solutions
Introduction to Linux Kernel by Quontra SolutionsIntroduction to Linux Kernel by Quontra Solutions
Introduction to Linux Kernel by Quontra SolutionsQUONTRASOLUTIONS
 
Intro to Linux Shell Scripting
Intro to Linux Shell ScriptingIntro to Linux Shell Scripting
Intro to Linux Shell Scriptingvceder
 
Lcu14 306 - OP-TEE Future Enhancements
Lcu14 306 - OP-TEE Future EnhancementsLcu14 306 - OP-TEE Future Enhancements
Lcu14 306 - OP-TEE Future EnhancementsLinaro
 

What's hot (20)

Browsing Linux Kernel Source
Browsing Linux Kernel SourceBrowsing Linux Kernel Source
Browsing Linux Kernel Source
 
Linux Preempt-RT Internals
Linux Preempt-RT InternalsLinux Preempt-RT Internals
Linux Preempt-RT Internals
 
Linux-Internals-and-Networking
Linux-Internals-and-NetworkingLinux-Internals-and-Networking
Linux-Internals-and-Networking
 
Linux kernel
Linux kernelLinux kernel
Linux kernel
 
Network Drivers
Network DriversNetwork Drivers
Network Drivers
 
Linux kernel architecture
Linux kernel architectureLinux kernel architecture
Linux kernel architecture
 
Part 02 Linux Kernel Module Programming
Part 02 Linux Kernel Module ProgrammingPart 02 Linux Kernel Module Programming
Part 02 Linux Kernel Module Programming
 
Debugging linux kernel tools and techniques
Debugging linux kernel tools and  techniquesDebugging linux kernel tools and  techniques
Debugging linux kernel tools and techniques
 
Linux Programming
Linux ProgrammingLinux Programming
Linux Programming
 
Geep networking stack-linuxkernel
Geep networking stack-linuxkernelGeep networking stack-linuxkernel
Geep networking stack-linuxkernel
 
Linux scheduler
Linux schedulerLinux scheduler
Linux scheduler
 
Architecture Of The Linux Kernel
Architecture Of The Linux KernelArchitecture Of The Linux Kernel
Architecture Of The Linux Kernel
 
Dpdk performance
Dpdk performanceDpdk performance
Dpdk performance
 
Linux systems - Linux Commands and Shell Scripting
Linux systems - Linux Commands and Shell ScriptingLinux systems - Linux Commands and Shell Scripting
Linux systems - Linux Commands and Shell Scripting
 
HKG15-311: OP-TEE for Beginners and Porting Review
HKG15-311: OP-TEE for Beginners and Porting ReviewHKG15-311: OP-TEE for Beginners and Porting Review
HKG15-311: OP-TEE for Beginners and Porting Review
 
Basic Linux Internals
Basic Linux InternalsBasic Linux Internals
Basic Linux Internals
 
Embedded Linux Kernel - Build your custom kernel
Embedded Linux Kernel - Build your custom kernelEmbedded Linux Kernel - Build your custom kernel
Embedded Linux Kernel - Build your custom kernel
 
Introduction to Linux Kernel by Quontra Solutions
Introduction to Linux Kernel by Quontra SolutionsIntroduction to Linux Kernel by Quontra Solutions
Introduction to Linux Kernel by Quontra Solutions
 
Intro to Linux Shell Scripting
Intro to Linux Shell ScriptingIntro to Linux Shell Scripting
Intro to Linux Shell Scripting
 
Lcu14 306 - OP-TEE Future Enhancements
Lcu14 306 - OP-TEE Future EnhancementsLcu14 306 - OP-TEE Future Enhancements
Lcu14 306 - OP-TEE Future Enhancements
 

Viewers also liked

Sim,raka hikmah ramadhan,hapzi ali,pengambilan keputusan,universitas mercu bu...
Sim,raka hikmah ramadhan,hapzi ali,pengambilan keputusan,universitas mercu bu...Sim,raka hikmah ramadhan,hapzi ali,pengambilan keputusan,universitas mercu bu...
Sim,raka hikmah ramadhan,hapzi ali,pengambilan keputusan,universitas mercu bu...Universitas MercuBuana
 
Simpeg user-guide-v.1.1
Simpeg user-guide-v.1.1Simpeg user-guide-v.1.1
Simpeg user-guide-v.1.1Aywan Nazhan
 
GeoComputation Conference - Dallas (2015)
GeoComputation Conference - Dallas (2015)GeoComputation Conference - Dallas (2015)
GeoComputation Conference - Dallas (2015)Irene Garcia-Marti
 
4º básico ensayo simce lenguaje
4º básico  ensayo simce lenguaje4º básico  ensayo simce lenguaje
4º básico ensayo simce lenguajeMilena Alarcón
 
ISG: TechChange Presentation on M&E MIS Systems
ISG: TechChange Presentation on M&E MIS SystemsISG: TechChange Presentation on M&E MIS Systems
ISG: TechChange Presentation on M&E MIS SystemsMichael Klein
 
Calendario movil
Calendario movilCalendario movil
Calendario movilHIKOO
 
ГАРААНЫ БИЗНЕС, ТҮҮНТЭЙ ХОЛБОГДОХ НЭР ТОМЪЁОНЫ ТАЙЛБАР ТОЛЬ
ГАРААНЫ БИЗНЕС, ТҮҮНТЭЙ ХОЛБОГДОХ НЭР ТОМЪЁОНЫ ТАЙЛБАР ТОЛЬ ГАРААНЫ БИЗНЕС, ТҮҮНТЭЙ ХОЛБОГДОХ НЭР ТОМЪЁОНЫ ТАЙЛБАР ТОЛЬ
ГАРААНЫ БИЗНЕС, ТҮҮНТЭЙ ХОЛБОГДОХ НЭР ТОМЪЁОНЫ ТАЙЛБАР ТОЛЬ ERKHEMSAIKHAN Altangerel
 
Understanding Geochaching Practices and Motivations
Understanding Geochaching Practices and MotivationsUnderstanding Geochaching Practices and Motivations
Understanding Geochaching Practices and MotivationsYoojung Kim
 
Вищі органи влади в Україні
Вищі органи влади в УкраїніВищі органи влади в Україні
Вищі органи влади в Україніradaprogram
 
Fashion spread outfit 3
Fashion spread outfit 3Fashion spread outfit 3
Fashion spread outfit 3bc05093848
 
Cuadro explicativo de lpoder electoral
Cuadro explicativo de lpoder electoralCuadro explicativo de lpoder electoral
Cuadro explicativo de lpoder electoralyasmin castillo
 
미디어 이용의 시공간적 매핑: 크로노토프 접근과 그 적용
미디어 이용의 시공간적  매핑: 크로노토프 접근과 그 적용미디어 이용의 시공간적  매핑: 크로노토프 접근과 그 적용
미디어 이용의 시공간적 매핑: 크로노토프 접근과 그 적용Yoojung Kim
 
Nasal polyposis
Nasal polyposisNasal polyposis
Nasal polyposisAnkit Sahu
 
Introduction to boilers
Introduction to boilersIntroduction to boilers
Introduction to boilersJinshah B.S
 

Viewers also liked (20)

Sim,raka hikmah ramadhan,hapzi ali,pengambilan keputusan,universitas mercu bu...
Sim,raka hikmah ramadhan,hapzi ali,pengambilan keputusan,universitas mercu bu...Sim,raka hikmah ramadhan,hapzi ali,pengambilan keputusan,universitas mercu bu...
Sim,raka hikmah ramadhan,hapzi ali,pengambilan keputusan,universitas mercu bu...
 
Estadistica
EstadisticaEstadistica
Estadistica
 
Simpeg user-guide-v.1.1
Simpeg user-guide-v.1.1Simpeg user-guide-v.1.1
Simpeg user-guide-v.1.1
 
GeoComputation Conference - Dallas (2015)
GeoComputation Conference - Dallas (2015)GeoComputation Conference - Dallas (2015)
GeoComputation Conference - Dallas (2015)
 
Escrito de artes visuales
Escrito de artes visualesEscrito de artes visuales
Escrito de artes visuales
 
Formulas excel
Formulas excelFormulas excel
Formulas excel
 
Presentación
PresentaciónPresentación
Presentación
 
4º básico ensayo simce lenguaje
4º básico  ensayo simce lenguaje4º básico  ensayo simce lenguaje
4º básico ensayo simce lenguaje
 
ISG: TechChange Presentation on M&E MIS Systems
ISG: TechChange Presentation on M&E MIS SystemsISG: TechChange Presentation on M&E MIS Systems
ISG: TechChange Presentation on M&E MIS Systems
 
Calendario movil
Calendario movilCalendario movil
Calendario movil
 
ГАРААНЫ БИЗНЕС, ТҮҮНТЭЙ ХОЛБОГДОХ НЭР ТОМЪЁОНЫ ТАЙЛБАР ТОЛЬ
ГАРААНЫ БИЗНЕС, ТҮҮНТЭЙ ХОЛБОГДОХ НЭР ТОМЪЁОНЫ ТАЙЛБАР ТОЛЬ ГАРААНЫ БИЗНЕС, ТҮҮНТЭЙ ХОЛБОГДОХ НЭР ТОМЪЁОНЫ ТАЙЛБАР ТОЛЬ
ГАРААНЫ БИЗНЕС, ТҮҮНТЭЙ ХОЛБОГДОХ НЭР ТОМЪЁОНЫ ТАЙЛБАР ТОЛЬ
 
Understanding Geochaching Practices and Motivations
Understanding Geochaching Practices and MotivationsUnderstanding Geochaching Practices and Motivations
Understanding Geochaching Practices and Motivations
 
Вищі органи влади в Україні
Вищі органи влади в УкраїніВищі органи влади в Україні
Вищі органи влади в Україні
 
Fashion spread outfit 3
Fashion spread outfit 3Fashion spread outfit 3
Fashion spread outfit 3
 
Copacetic Diabetic
Copacetic DiabeticCopacetic Diabetic
Copacetic Diabetic
 
Cuadro explicativo de lpoder electoral
Cuadro explicativo de lpoder electoralCuadro explicativo de lpoder electoral
Cuadro explicativo de lpoder electoral
 
미디어 이용의 시공간적 매핑: 크로노토프 접근과 그 적용
미디어 이용의 시공간적  매핑: 크로노토프 접근과 그 적용미디어 이용의 시공간적  매핑: 크로노토프 접근과 그 적용
미디어 이용의 시공간적 매핑: 크로노토프 접근과 그 적용
 
Nasal polyposis
Nasal polyposisNasal polyposis
Nasal polyposis
 
Introduction to boilers
Introduction to boilersIntroduction to boilers
Introduction to boilers
 
Maquinas eletricas
Maquinas eletricasMaquinas eletricas
Maquinas eletricas
 

Similar to Using strace

System Calls.pptxnsjsnssbhsbbebdbdbshshsbshsbbs
System Calls.pptxnsjsnssbhsbbebdbdbshshsbshsbbsSystem Calls.pptxnsjsnssbhsbbebdbdbshshsbshsbbs
System Calls.pptxnsjsnssbhsbbebdbdbshshsbshsbbsashukiller7
 
OPERATING SYSTEM SERVICES, OPERATING SYSTEM STRUCTURES
OPERATING SYSTEM SERVICES, OPERATING SYSTEM STRUCTURESOPERATING SYSTEM SERVICES, OPERATING SYSTEM STRUCTURES
OPERATING SYSTEM SERVICES, OPERATING SYSTEM STRUCTURESpriyasoundar
 
202110 SESUG 49 UNIX X Command Tips and Tricks
202110 SESUG 49 UNIX X Command Tips and Tricks202110 SESUG 49 UNIX X Command Tips and Tricks
202110 SESUG 49 UNIX X Command Tips and Tricksdhorvath
 
Laboratory exercise - Network security - Penetration testing
Laboratory exercise - Network security - Penetration testingLaboratory exercise - Network security - Penetration testing
Laboratory exercise - Network security - Penetration testingseastorm44
 
What Have Syscalls Done for you Lately?
What Have Syscalls Done for you Lately?What Have Syscalls Done for you Lately?
What Have Syscalls Done for you Lately?Docker, Inc.
 
(SAS) UNIX X Command Tips and Tricks
(SAS) UNIX X Command Tips and Tricks(SAS) UNIX X Command Tips and Tricks
(SAS) UNIX X Command Tips and TricksDavid Horvath
 
Process management in linux
Process management in linuxProcess management in linux
Process management in linuxMazenetsolution
 
It802 bruning
It802 bruningIt802 bruning
It802 bruningmrbruning
 
202202 SUGUKI UNIX X Command Tips and Tricks
202202 SUGUKI UNIX X Command Tips and Tricks202202 SUGUKI UNIX X Command Tips and Tricks
202202 SUGUKI UNIX X Command Tips and Tricksdhorvath
 
Introduction to Unix
Introduction to UnixIntroduction to Unix
Introduction to UnixSudharsan S
 
Open Source Systems Performance
Open Source Systems PerformanceOpen Source Systems Performance
Open Source Systems PerformanceBrendan Gregg
 
Monitoring MySQL with DTrace/SystemTap
Monitoring MySQL with DTrace/SystemTapMonitoring MySQL with DTrace/SystemTap
Monitoring MySQL with DTrace/SystemTapPadraig O'Sullivan
 
Servers and Processes: Behavior and Analysis
Servers and Processes: Behavior and AnalysisServers and Processes: Behavior and Analysis
Servers and Processes: Behavior and Analysisdreamwidth
 
Basics of Linux Commands, Git and Github
Basics of Linux Commands, Git and GithubBasics of Linux Commands, Git and Github
Basics of Linux Commands, Git and GithubDevang Garach
 
Essential Linux Commands for DBAs
Essential Linux Commands for DBAsEssential Linux Commands for DBAs
Essential Linux Commands for DBAsGokhan Atil
 
CLUG 2010 09 - systemd - the new init system
CLUG 2010 09 - systemd - the new init systemCLUG 2010 09 - systemd - the new init system
CLUG 2010 09 - systemd - the new init systemPaulWay
 

Similar to Using strace (20)

System Calls.pptxnsjsnssbhsbbebdbdbshshsbshsbbs
System Calls.pptxnsjsnssbhsbbebdbdbshshsbshsbbsSystem Calls.pptxnsjsnssbhsbbebdbdbshshsbshsbbs
System Calls.pptxnsjsnssbhsbbebdbdbshshsbshsbbs
 
OPERATING SYSTEM SERVICES, OPERATING SYSTEM STRUCTURES
OPERATING SYSTEM SERVICES, OPERATING SYSTEM STRUCTURESOPERATING SYSTEM SERVICES, OPERATING SYSTEM STRUCTURES
OPERATING SYSTEM SERVICES, OPERATING SYSTEM STRUCTURES
 
202110 SESUG 49 UNIX X Command Tips and Tricks
202110 SESUG 49 UNIX X Command Tips and Tricks202110 SESUG 49 UNIX X Command Tips and Tricks
202110 SESUG 49 UNIX X Command Tips and Tricks
 
Laboratory exercise - Network security - Penetration testing
Laboratory exercise - Network security - Penetration testingLaboratory exercise - Network security - Penetration testing
Laboratory exercise - Network security - Penetration testing
 
Penetration Testing Boot CAMP
Penetration Testing Boot CAMPPenetration Testing Boot CAMP
Penetration Testing Boot CAMP
 
Linux
LinuxLinux
Linux
 
Systemcall1
Systemcall1Systemcall1
Systemcall1
 
What Have Syscalls Done for you Lately?
What Have Syscalls Done for you Lately?What Have Syscalls Done for you Lately?
What Have Syscalls Done for you Lately?
 
(SAS) UNIX X Command Tips and Tricks
(SAS) UNIX X Command Tips and Tricks(SAS) UNIX X Command Tips and Tricks
(SAS) UNIX X Command Tips and Tricks
 
Process management in linux
Process management in linuxProcess management in linux
Process management in linux
 
It802 bruning
It802 bruningIt802 bruning
It802 bruning
 
202202 SUGUKI UNIX X Command Tips and Tricks
202202 SUGUKI UNIX X Command Tips and Tricks202202 SUGUKI UNIX X Command Tips and Tricks
202202 SUGUKI UNIX X Command Tips and Tricks
 
Introduction to Unix
Introduction to UnixIntroduction to Unix
Introduction to Unix
 
Open Source Systems Performance
Open Source Systems PerformanceOpen Source Systems Performance
Open Source Systems Performance
 
Monitoring MySQL with DTrace/SystemTap
Monitoring MySQL with DTrace/SystemTapMonitoring MySQL with DTrace/SystemTap
Monitoring MySQL with DTrace/SystemTap
 
Servers and Processes: Behavior and Analysis
Servers and Processes: Behavior and AnalysisServers and Processes: Behavior and Analysis
Servers and Processes: Behavior and Analysis
 
x86
x86x86
x86
 
Basics of Linux Commands, Git and Github
Basics of Linux Commands, Git and GithubBasics of Linux Commands, Git and Github
Basics of Linux Commands, Git and Github
 
Essential Linux Commands for DBAs
Essential Linux Commands for DBAsEssential Linux Commands for DBAs
Essential Linux Commands for DBAs
 
CLUG 2010 09 - systemd - the new init system
CLUG 2010 09 - systemd - the new init systemCLUG 2010 09 - systemd - the new init system
CLUG 2010 09 - systemd - the new init system
 

Recently uploaded

Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 

Recently uploaded (20)

Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 

Using strace

  • 1. Using Strace Tracking System Calls and Signals
  • 2. What is Strace? • A system program that traces system calls and signals of any script or program • Allows the customization of output to focus on the area you need to examine • Quickly see a permissions issue • Find files that are opened and closed • Helps to troubleshoot problems
  • 3. How to use Strace? • Installation done by running /scripts/ensurerpm strace or yum install strace • Run the command “strace” with several options. Here are a few examples: strace -fvs 4096 $(SCRIPT) f = follow forks v = verbose output s = output line size (the size 4096 give this many characters)
  • 4. How to use Strace? • Additional options • Example of using all useful options This command will show all system calls and signals of cPanel, WHM or Webmail UI actions -o = output goes to this file -p = process PID to strace strace -fvs 4096 -o /root/cpservd.strace -p `cat /var/run/cpsrvd.pid`
  • 5. How to use Strace? • Advanced Use: • Calls that can be traced: strace -e trace=file will trace only file accesses strace -e trace=network will trace only network activity strace -e trace=open will trace only open system calls strace -e trace=!open will trace all system calls except open strace -e trace=open,close,read,write strace -e trace=process strace -e trace=signal
  • 6. How to read Strace output? • Strace shows System Calls: • Strace shows the Signals received (but not where they came from): read write open close stat fork connect getuid getgid setuid setgid execve chmod chown SIGINT (ex. ctrl-c) SIGKILL (kill -9) ENOENT (file or directory not found) EPERM (permission error) (chmod) ENOPERM (permission error (chown) EACCESS if -1 (permission denied) SIGSEGV (Segmentation fault)
  • 7. How to read output? • Once you get the strace output, just view the output file. 1. Start with the error message. Search through the log file for the error messages displayed: Example: 32116 write(1, “There was a problem creating the”, 32)=32 2. Then start scrolling up for the last action resulting in an error before the error was written to stdout: Example: 32116 open("/home/scooby/etc/snoopy.com/passwd", O_WRONLY|O_CREAT|O_APPEND| O_LARGEFILE, 0666) = -1 EACCES (Permission denied)
  • 8. Strace will not show: • Any program logic • Computation • Strace is not a debugger