问题标签 [truss]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
3 回答
848 浏览

unix - 替代“truss -p”指令

我正在寻找 Unix 中返回进程状态的命令(活动、死亡、睡眠、等待另一个进程等)

有没有可用的?
一个shell脚本可能吗?

0 投票
2 回答
1156 浏览

solaris - man kaio: kaio 没有手动输入

我捆绑了一个过程,它们如下所示。而且我想知道kaio的定义,但是kaio没有手动输入,请问能否得到定义呢?

0 投票
2 回答
3020 浏览

matlab - MATLAB 和 gplot

我试图找到一种在 MATLAB 中绘制桁架的方法,我可以通过使用邻接矩阵和 gplot 函数来做到这一点,但它的方法非常冗长,尤其是在有很多节点相互连接的情况下。有没有更快的方法来做到这一点?

0 投票
1 回答
1199 浏览

sleep - Process under FreeBSD 9.0 hangs in uninterruptable sleep with apparently no syscall (empty wchan)

I have a custom logging process that is reading from STDIN and sending the data out via TCP to a scribed logging server. STDIN is in my case an access log that is attached to Apache httpd 2.2 like this in httpd.conf: CustomLog "|/usr/local/bin/serelog" default

My serelog process sometimes goes into uninterruptable sleep under FreeBSD 9.0 and does not return from it. It works reliably under other operating systems though, including FreeBSD 8, Linux 2.6 and Linux 3.1.

How can I find out what could be the reason for the uninterruptable sleep?

The overall structure is like this: httpd --[PIPE]--> serelog --[TCP-CONNECTION]--> scribed

Until now I did the following analysis:

  • Using ps: stat is "D" and wchan is "-". So there is apparently no syscall, which doesn't make too much sense to me, as the process in uninterruptable sleep and should be in kernel land.
  • As the process is in state "D", the process does not react to kill -9 as expected.
  • Attaching truss to serelog externally from a shell: As long as truss is attached, serelog runs smoothly. Shortly (Seconds) after detaching truss from serelog, serelog goes into "D" state.
  • When attaching truss to serelog AFTER it has entered "D" state, truss prints nothing
  • In "D" state, lsof shows that the incoming PIPE is full. This is exected, as in "D" state the process "sleeps" and cannot read any longer. The outgoing TCP-CONNECTION is empty.
  • If I kill the "surrounding" Apache httpd server, the serelog process eventually terminates after (e.g.) 40 minutes.
  • Checking what others report in forums about the uninterruptable problem was not successful: In my setup there is no NFS. And as it is a server there is also no user interaction with CD drives or pluggable hardware.

So I am now stuck with a process that is uninterruptable, is apparently not in a syscall, and works reliably when traced. The only good thing is that I am able to reproduce the behavior in a few seconds or minutes when I send a lot of HTTP requests via JMeter loadtest (5 threads in JMeter).

Any tips on debugging, kernel parameter tuning are appreciated.

Greetings

0 投票
1 回答
111 浏览

multithreading - truss 中的上下文系统调用

在 Solaris 10 中获取进程的 truss 时,我发现了以下语句

请解释这个系统调用的context含义在这个调用之后我看到线程 2 的行为就像另一个线程 4。

0 投票
1 回答
91 浏览

matlab - 我可以使用哪个循环和哪个坐标系统来自动化这个桁架结构的例子

我对 matlab 完全陌生,似乎无法让 if 循环工作。例如,如果 Ln > k ,绘制点 i(n-1) 到 i(n)。我如何自动将正确的行或列向量分配给 i(n)?

这是我想要的图表

在此处输入图像描述

我想要实现的是将 i(0) 连接到 i(1) 到 ... i(n-1) 到 i(n)。

我也有点困惑使用哪个坐标系?我认为使用极坐标系统会很容易。定义点 i(o) 的距离和角度,然后从点 i(1) 做同样的事情,但据我所知,有必要转换回笛卡尔坐标系。

一旦我对本节感到满意,我就有信心可以采取下一步措施,并为我的问题制定完整的解决方案。如果您对我想要实现的目标感兴趣,这里有一个链接

[请注意] 在我链接的那个问题中,有人告诉我我把它搞砸了。如果这个问题也不清楚,我很抱歉。我真的花时间尽可能清楚地说明它。我有时很难表达自己。

0 投票
1 回答
543 浏览

bash - 将 stderr 重定向到使用进程替换创建的子 shell 时遇到问题

以下命令按预期工作:

......但这不起作用,我已经没有想法找出原因:

内部的命令>()最终阻塞等待输入。

如果我这样做:

...它按预期工作,尽管这不起作用:

如果我制作some command= dd bs=1,它会消耗并打印所有文本桁架会吐出的stderr,然后阻塞。

我无法在 Linux 中重现类似的行为,只有truss在 solaris 中使用时。

0 投票
1 回答
471 浏览

c - 使用 truss 调试 open() 命令调用

使用truss -t'open' $(program_call)我得到:

问题是,我将文件描述符初始化为 -1,所以我知道 open 调用必须成功,因为它改变了变量的值。文件描述符实际上初始化为 -1,然后在 open 命令调用中以某种方式更改为 9(否则程序将在那里结束),但 open 调用并未显示在truss调用中,并且计算机无法将其识别为开放。

一些代码:

0 投票
1 回答
138 浏览

c++ - c++ 的图形

我在 C++ 中有这个桁架求解器实现,对于给定的桁架和边界条件,它计算关节处的位移和元素处的应力。所以在运行结束时,控制台会显示如下内容:

我想绘制结果以查看屏幕上的变形结构,例如:http ://www.aem.umn.edu/people/faculty/shield/software/truss/main12.gif

或者

http://upload.wikimedia.org/wikipedia/commons/thumb/3/3a/Deformframe.JPG/750px-Deformframe.JPG

我对如何实现这种图形的了解为零。因此,易于实施或快速/易于学习的解决方案将受到赞赏。顺便说一句,我正在使用适用于 Windows 的 CodeBlocks,我希望最终的应用程序是跨平台的。

如果有什么我没有考虑到或者你有其他建议,我想知道他们。

谢谢。

0 投票
2 回答
656 浏览

freebsd - 如何从源代码跟踪 FreeBSD 中的系统调用?

如何从源代码在 FreeBSD 10.1 x86_64 上记录系统调用(系统调用号和返回值,对于int 0x80和)?sysenter/syscall

我知道truss可以完成这项工作,但我需要copyout在每个系统调用期间记录其他信息,例如缓冲区。

我试图找到 的源代码truss,但失败了。我也尝试在 中追踪它们amd64_syscall(),但与truss. 关于在实现中我应该关心哪些功能的任何想法?