2012-05-15 3 views
1

온라인으로 systemtap 튜토리얼을 읽은 후에는 http://sourceware.org/systemtap/tutorial/이고 운동을하려고했습니다. 어떤이, 일이 발생 주목 나는 오랜 시간 동안 검색 한 t.stp $ STAP-L의 PROBE : 2.3 Q1에서, -L 옵션은 work..I 터미널에 스크립트systemtap -L 옵션을 사용하는 방법은 무엇입니까?

probe kernel.function("*nit*"){} 

유형을 가진 적이 없어 보인다 이 옵션에 대한 정보는 systemtap의 웹 사이트에서도 확인할 수 있습니다.

도움이 필요하십니까?

감사합니다.

답변

3
$ stap -L 'kernel.function("blahblah")' 

Systemtap은 훌륭하지만 설명서가 좋지 않습니다. man stap에서

3

는 (설치 systemtap*-1.7-2.fc15.x86_64 RPM을 포함)

stap [ OPTIONS ] -l PROBE [ ARGUMENTS ] 
    stap [ OPTIONS ] -L PROBE [ ARGUMENTS ] 

    -l PROBE 
      Instead of running a probe script, just list all available probe 
      points matching the given single probe point. The pattern may 
      include wildcards and aliases, but not comma-separated multiple 
      probe points. The process result code will indicate failure if 
      there are no matches. 

    -L PROBE 
      Similar to "-l", but list probe points and script-level local 
      variables. 

은 "프로브 점"을 참조하십시오 'kernel.function ("blahblah")'등 이전에는 키워드 "프로브"없이 프로브 핸들러가 없습니다 나중에.

0

다음 예를 시도해 볼 수 있습니다.

모든 커널 기능의 목록을 가져옵니다.

$ stap -l 'kernel.function ("*")'| 정렬

kernel.function ("[email protected]/build/linux-lts-xenial-Hu9lgy/linux-lts-xenial-4.4.0/fs/read_write.c 440") [...]

|

은 '("*") kernel.function'커널 함수를 & 인수 (지역 변수)

$ STAP의 -L를 얻으려면 grep vfs_read

kernel.function ("[email protected]/build/linux-lts-xenial-Hu9lgy/linux-lts-xenial-4.4.0/fs/read_write.c : 440") $ file : struct file * $ 버피 : 문자 *의 $ 수 : size_t와의 $ pos의 : loff_t *

[...]

0

그냥 나보다 더 배운 사람들이 말한에 추가 : 일반에 대한

stap -L 'module("module-name-here").function("*")' 

커널 프로브 :

stap -L 'kernel.function("*")' 

앞으로 도움이되기를 바랍니다.