由买买提看人间百态

topics

全部话题 - 话题: strace
1 (共1页)
T********r
发帖数: 6210
1
来自主题: Unix版 - who knows how to view the core file?
yes, however it's better to use strace to trace the problem, it's
quicker. try to find 'strace' command in your system, or find it at
www.sunfreeware.com.
c***p
发帖数: 221
2
来自主题: JobHunting版 - R i v e r b e d 面经
编程:
1. strstr(char* str, char* substr)
与常规要求不同的是,需要返回最后一个匹配的子串
2. c++ STL 中 map 的实现细节(redblack tree). 比如, 如果删除了一个元素,以前
得到的iterator是否valid.
基础知识:
1. socket API: both client side and server side;
connect 如何setup. (three-way hand shaking protocol)
2. VLAN (没答上来)
3. tcp protocol: flow control, congestion control.
4. memory management:
how to manage; (my answer: linked list)
how to check if some address has been allocated
5. 如何debug memory leak.
我回答了很多:看ps, strace, valgrind. 最后才知道他要的是g... 阅读全帖
y***u
发帖数: 174
3
来自主题: JobHunting版 - 明天A家onsite
面过类似的,我倒是没考虑到LB会过载的情况,不愧是老同志了。不过要考虑可能LB的
vip出错。
balance算法没啥好说的吧,出错可能性不大。
AS那边可以考虑用strace来profile一下,看看哪个API耗时最多。另外apache有个ab命
令可以查request/sec, response time之类的,挺好的,可以用来investigate。
我当时说的其他可能的几个corner case是,一个是有没有用cache。如果某个新的
cache server上线,去这个server的request会有大量的cache miss。
另外还扯了一点怎么增速,比如说把动态内容变成静态啊,用memcache啊,或者利用
cache避免重复编译什么的。其他想不到了。。
w********s
发帖数: 1570
4
ptrace, strace
procfs 里查status, locks, context switches
你看上去缺乏实践,只刷题了?

up.
because
y*w
发帖数: 125
5
来自主题: CS版 - I/O cost
strace -c
it counts the totoal # of I/O calls as well as estimated I/O time.
same as time cmd, better to use without other processes running,
c******n
发帖数: 4965
6
来自主题: Hardware版 - my Raspberry PI
pretty good
so far I'm using it as a
samba file sharing server
samba print server
xbmc media (mostly video and pictures slideshow)
xbmc has some issues in that it can not pull files from my usb hard drive
(randomly goes into a dead loop where a sys call read() always returns error
"resource not ready" according to strace ), but reading pics from
SD card is ok ---- I bought a 10G sd card, so every time I show slideshow,
I'll copy files from the hard drive over.
also xbmc seems to bitch about big ... 阅读全帖
N****w
发帖数: 21578
7
strace shows all the open() calls....
w****g
发帖数: 597
8
$ trace -f -oa.txt ./a.o
bash: trace: command not found
系统需要安装什么package才会有trace?
OS: Ubuntu 9.04.
另外,Ubuntu已经有strace命令,不需要安装它了。但是,还需要安装trace命令.
w********e
发帖数: 557
9
Shouldn't it be strace?
l******e
发帖数: 12192
j**f
发帖数: 28
11
"strace -p pid" or "retty pid" may be useful for your problem.
f*****g
发帖数: 3086
12
retty 好像没有 64-bit
我试试strace
f*****g
发帖数: 3086
13
strace works for me
thanks a lot!
S***d
发帖数: 1802
14

据我自己的经验,这种情况一般是操作者自己的错误造成的。
可以strace一下。
j*a
发帖数: 14423
15
strace ip add

IP
y***d
发帖数: 2330
16
strace ifconfig
socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 4
ioctl(4, SIOCGIFCONF, {80, {{"lo", {AF_INET, inet_addr("127.0.0.1")}}, {"
eth0", {AF_INET, inet_addr("xxx.xxx.xxx.xxx")}}}}) = 0

it
S*A
发帖数: 7142
17
来自主题: Linux版 - fedora (14) root 用户没有声音
我没有 ppstream 所以没法看为什么不对,多数是和 X display
设定有关的。
你应该看看 ppstream 为什么不能用 root. 例如 strace ppstream
看看都有什么的 system call permission deny 了。
a*******e
发帖数: 3021
18
来自主题: Linux版 - fedora (14) root 用户没有声音
下了个strace,好多好多屏信息阿,太复杂了看不懂
S*A
发帖数: 7142
19
I don't know. It does not make sense. Is that system-config-date?
I would just "sudo strace -p " to see
what does this process currently doing. That would give you
more insight.
c******n
发帖数: 4965
20
I guess it has to call the hardware signature generation through some
syscall,
is it possible to hijack these syscalls like in strace? given that xbox
cpu is just x86, this is likely
m**k
发帖数: 290
21
麻烦贴一下这个命令的结果
strace -f find . -name *.inf -exec cp {} ../anotherFolder/{} \; 2>&1 | grep
exec
S*A
发帖数: 7142
22
来自主题: Linux版 - 24 processes reading one file
try to mmap the 100M file in your 24 process and read
it using mmaped pointer. That way, there is no memcpy
from kernel to user space buffer.
10 minutes sounds too slow. What happen if you strace
one of the process? Where does it spend most of the time
on?
a****s
发帖数: 9
23
strace ls
C***y
发帖数: 2546
24
来自主题: Linux版 - Inter-thread pipe会写磁盘吗?
谢谢!
那Child process 往redirect std out里写呢(strace里可以看到write(1,.....)?
s*****g
发帖数: 1055
25
来自主题: Linux版 - HELP: 新server登录慢的原因
strace will tell you everything including what syscalls are using how much
time.
s*****g
发帖数: 1055
26
来自主题: Linux版 - HELP: 新server登录慢的原因
strace will tell you everything including what syscalls are using how much
time.
g****0
发帖数: 220
27
Trying to monitor some system calls by w3wp.exe of IIS. STrace can be used
for a common exe file like notepad.exe. But not sure about server process.
Anyone has any good suggestions? Thanks very much.
f******e
发帖数: 164
28
【 以下文字转载自 Linux 讨论区 】
发信人: francise (小飞猫), 信区: Linux
标 题: 奇怪的问题:关于一个简单的malloc()小程序
发信站: BBS 未名空间站 (Sun Mar 30 17:43:48 2008)
我写了一段小程序:
#include
#include
int main(int argc, char *argv[]){
char *buffer;
int num_byte;
num_byte = atoi(argv[1])*1024;
while(1)
{buffer=malloc(num_byte);
free(buffer);
}
}
然后我用
strace ./code 126
结果是:
....
brk(0) = 0x804965c
brk(0x8068e74) = 0x8068e74
brk(0x8069000) = 0x8069000
(Nothing further)
为什么只有有限的几个brk()?
问题是,我的程序明明是无限循环啊
r*********r
发帖数: 3195
29
来自主题: Programming版 - 最讨厌的人是。。。
raymond 的小故事? 骗骗小孩的。
我觉得shell致命的弱点是把 command 当成 function 来用。
但是 command 出错的机率比一般的 function 高了几个量级,
shell 又没有很好的查错机制 (profiling, debugging,
checking return value, catching exceptions, etc)。
所以大部分的 shell script 比较脆弱。
上次的事,后来还是我自己找到了 stuck 的 command,
又单独 strace 了一下那个命令,才解决问题。
一般不怎么编程的 sys admin,还是不给力。跟编程的人比起来差远了。
n*****t
发帖数: 22014
30
syscall 可破,应该是 link layer 的一个什么玩意,具体忘记了。tcpdump 可以指定
网卡,你用 strace 看看这货干了点啥破事。
子网不是问题,设置好 route 和 netmask。

发帖数: 1
31
目前发现两大问题:
1. GOGC,关闭Garbage Collection,性能提高20%,无语了,golang不是吹牛GC比JVM
G1强很多么?NGINX不用GC不是照样可以写程序么?
2. 滥用FUTEX,从strace上看,一个HTTP GET引发众多threads拼抢,thundering herd
problem,跟NGINX的SO_REUSEPORT设计完全不同。GO runtime调度需要用futex,众多
goroutines给本来就很脆弱的futex加重负担。
各位大侠,我没学过golang,只花了几天测测http性能,就发现这两个问题,这应该是
设计失误吧?
[pid 29063] <... epoll_wait resumed> [{EPOLLIN|EPOLLOUT, {u32=4228357504,
u64=140170486062464}}], 128, -1) = 1
[pid 29063] futex(0x147c010, FUTEX_WAKE, 1) = 1
[pid 29063] read(6,
[pid 290... 阅读全帖

发帖数: 1
32
目前发现两大问题:
1. GOGC,关闭Garbage Collection,性能提高20%,无语了,golang不是吹牛GC比JVM
G1强很多么?NGINX不用GC不是照样可以写程序么?
2. 滥用FUTEX,从strace上看,一个HTTP GET引发众多threads拼抢,thundering herd
problem,跟NGINX的SO_REUSEPORT设计完全不同。GO runtime调度需要用futex,众多
goroutines给本来就很脆弱的futex加重负担。
各位大侠,我没学过golang,只花了几天测测http性能,就发现这两个问题,这应该是
设计失误吧?
[pid 29063] <... epoll_wait resumed> [{EPOLLIN|EPOLLOUT, {u32=4228357504,
u64=140170486062464}}], 128, -1) = 1
[pid 29063] futex(0x147c010, FUTEX_WAKE, 1) = 1
[pid 29063] read(6,
[pid 290... 阅读全帖
1 (共1页)