stapxx problem

131 views
Skip to first unread message

杨阳

unread,
Sep 29, 2015, 5:25:00 AM9/29/15
to openresty-en
Hi, agentzh

when I run the stapxx tools to test my ngxin_lua process, it jumps "cannot find @use library nginx.lua", can you tell me what's the problem? thanks.

杨阳

unread,
Sep 29, 2015, 5:44:09 AM9/29/15
to openresty-en
I use nginx 1.7.10 and ubuntu 3.13.0-65-generic #105

在 2015年9月29日星期二 UTC+8下午5:25:00,杨阳写道:

Yichun Zhang (agentzh)

unread,
Sep 29, 2015, 9:39:50 AM9/29/15
to openresty-en
Hello!

On Tue, Sep 29, 2015 at 5:25 PM, 杨阳 wrote:
> when I run the stapxx tools to test my ngxin_lua process, it jumps "cannot
> find @use library nginx.lua", can you tell me what's the problem? thanks.
>

This means that you move the stap++ script out of its original source
tree where its tapset libraries reside. You should only set the PATH
environment to make stap++ visible to your system instead of moving
the stap++ script itself around like under /usr/local/bin/, which just
won't work. Please read the documentation for more details about
installation.

Regards,
-agentzh

杨阳

unread,
Sep 29, 2015, 10:01:47 PM9/29/15
to openresty-en
But to be a little stange,  after I set the path where stap++ to be visible, but "env stap++" jumps "No input file specified." , so I can't run all the systemtap scripts, because this, I try to move the stap++ to /usr/local/bin



在 2015年9月29日星期二 UTC+8下午5:25:00,杨阳写道:
Hi, agentzh

Yichun Zhang (agentzh)

unread,
Sep 29, 2015, 10:36:02 PM9/29/15
to openresty-en
Hello!

On Wed, Sep 30, 2015 at 10:01 AM, 杨阳 wrote:
> But to be a little stange, after I set the path where stap++ to be visible,
> but "env stap++" jumps "No input file specified." , so I can't run all the
> systemtap scripts, because this, I try to move the stap++ to /usr/local/bin
>

Then you must have made mistakes when setting your PATH environment. I
don't see how this issue is specific to stap++. It's all about your OS
and shell.

Regeards,
-agentzh

杨阳

unread,
Sep 29, 2015, 10:50:16 PM9/29/15
to openresty-en
maybe my fault,  scripts in examples can be exec "sudo ./stap++ -I ./tapset -x 16180 --arg limit=10 samples/lj-lua-stacks.sxx " like this?  luajit should be debug version?



在 2015年9月29日星期二 UTC+8下午5:25:00,杨阳写道:
Hi, agentzh

Yichun Zhang (agentzh)

unread,
Sep 29, 2015, 11:01:32 PM9/29/15
to openresty-en
Hello!

On Wed, Sep 30, 2015 at 10:50 AM, 杨阳 wrote:
> maybe my fault, scripts in examples can be exec "sudo ./stap++ -I ./tapset
> -x 16180 --arg limit=10 samples/lj-lua-stacks.sxx " like this? luajit
> should be debug version?
>

Your sudo may *not* inherit the PATH environment settings of your own
user account. This is the case for many recent Linux distributions,
for example. You can either

1. edit your /etc/sudoers file to allow environment inheritance in sudo, and/or
2. add your own user account to the groups stapdev and stapusr so that
you don't need sudo to run systemtap at all.

Hope these help.

Regards,
-agentzh

Yichun Zhang (agentzh)

unread,
Sep 29, 2015, 11:08:47 PM9/29/15
to openresty-en
Hello!

On Wed, Sep 30, 2015 at 11:01 AM, Yichun Zhang (agentzh) wrote:
> Your sudo may *not* inherit the PATH environment settings of your own
> user account. This is the case for many recent Linux distributions,
> for example. You can either
>
> 1. edit your /etc/sudoers file to allow environment inheritance in sudo, and/or
> 2. add your own user account to the groups stapdev and stapusr so that
> you don't need sudo to run systemtap at all.
>

Oh, forgot to mention that you can (permanently) edit the PATH
environment of your *root* account as well (every system account
usually have a different set of environments). Oh yes, as I said
before, it's all about your OS and shell :)

Regards,
-agentzh
Reply all
Reply to author
Forward
0 new messages