dtruss & strace

简介: dtruss for Macstrace for LinuxTop 10 DTrace scripts for Mac OS XNAME dtruss - process syscall details. Uses DTrace.SYNOPSIS dtruss [-acdeflhoLs] [-t syscall] { -p PID

strace for Linux

Top 10 DTrace scripts for Mac OS X

NAME
       dtruss - process syscall details. Uses DTrace.

SYNOPSIS
       dtruss [-acdeflhoLs] [-t syscall] { -p PID | -n name | command }

DESCRIPTION
       dtruss  prints  details  on  process system calls. It is like a DTrace version of truss, and has been
       designed to be less intrusive than truss.

       Of particular interest is the elapsed times and on cpu times, which can identify  both  system  calls
       that are slow to complete, and those which are consuming CPU cycles.

       Since this uses DTrace, only users with root privileges can run this command.

OPTIONS
       -a     print all details

       -b bufsize
              dynamic  variable  buffer  size. Increase this if you notice dynamic variable drop errors. The
              default is "4m" for 4 megabytes per CPU.

       -c     print system call counts

       -d     print relative timestamps, us

       -e     print elapsed times, us

       -f     follow children as they are forked

       -l     force printing of pid/lwpid per line

       -L     don't print pid/lwpid per line

       -n name
              examine processes with this name

       -o     print on-cpu times, us

       -s     print stack backtraces

       -p PID examine this PID

       -t syscall
              examine this syscall only


EXAMPLES
       run and examine the "df -h" command
              # dtruss df -h


       examine PID 1871
              # dtruss -p 1871


       examine all processes called "tar"
              # dtruss -n tar


       run test.sh and follow children
              # dtruss -f test.sh

       run the "date" command and print elapsed and on cpu times,
              # dtruss -eo date


FIELDS
       PID/LWPID
              Process ID / Lightweight Process ID

       RELATIVE
              relative timestamps to the start of the thread, us (microseconds)

       ELAPSD elapsed time for this system call, us

       CPU    on-cpu time for this system call, us

       SYSCALL(args)
              system call name, with arguments (some may be evaluated)


DOCUMENTATION
       See the DTraceToolkit for further documentation under the Docs directory. The DTraceToolkit docs  may
       include full worked examples with verbose descriptions explaining the output.

EXIT
       dtruss will run forever until Ctrl-C is hit, or if a command was executed dtruss will finish when the
       command ends.

AUTHOR
       Brendan Gregg [Sydney, Australia]

SEE ALSO
       procsystime(1M), dtrace(1M), truss(1)
目录
相关文章
|
人工智能 测试技术 Go
如何使用 Google 的 Gemini
Google Gemini是谷歌发布的人工智能大模型,能够在从数据中心到移动设备等不同平台上运行。本文将介绍Gemini以及如何使用Gemini。
1954 0
|
存储 安全 数据安全/隐私保护
OAuth 2.0 的授权机制
【10月更文挑战第5天】
810 2
|
监控 Rust 安全
Rust代码在公司电脑监控软件中的内存安全监控
使用 Rust 语言开发的内存安全监控软件在企业中日益重要,尤其对于高安全稳定性的系统。文中展示了如何用 Rust 监控内存使用:通过获取向量长度和内存大小来防止泄漏和溢出。此外,代码示例还演示了利用 reqwest 库自动将监控数据提交至公司网站进行实时分析,以保证系统的稳定和安全。
982 2
|
机器学习/深度学习 PyTorch 算法框架/工具
【YOLOV5-6.x中文注释版】整体项目代码全中文注释导航页面-By2022
现在YOLOV5已经更新到6.X版本,现在网上很多还停留在5.X的源码注释上,因此特开一贴传承开源精神!
359 0
|
运维 Kubernetes Cloud Native
|
JSON 数据格式 iOS开发
**iOS发JSON请求中字符串加转义,返回的JSON去转义
iOS中使用NSSerialization把对象转为JSON字符串后,多出来反斜杠的问题 http://segmentfault.com/q/1010000000576646 NSDictionary *dic = @{@"url": @"http://.
4829 0
|
网络安全 数据安全/隐私保护 安全
SSL证书生成流程
SSL证书通过在客户端浏览器和Web服务器之间建立一条SSL安全通道(Secure socketlayer(SSL),SSL安全协议主要用来提供对用户和服务器的认证;对传送的数据进行加密和隐藏;确保数据在传送中不被改变,即数据的完整性,现已成为该领域中全球化的标准。
5855 0
|
JSON 数据格式
非常实用的5种json数组去重方法,函数实现思路竟是chatgpt帮我写的!
你敢信这5种json数组去重方法的实现思路竟然是chatgpt写的,chatgpt对函数的理解也太准确了吧!
562 0