Sponsored Content
Operating Systems Solaris Prustat throwing error only in zones not in global Post 303034548 by Sumanthsv on Monday 29th of April 2019 03:52:39 AM
Old 04-29-2019
Prustat throwing error only in zones not in global

Hi,

Prustat is throwing error only in zones. But it is working fine in global.
Code:
dtrace: invalid probe specifier
/*
** The following is a trimmed version of two seperate DTrace scripts:
**
** socketsnoop.d - snoop TCP network socket traffic by process.
**  This is intended to identify the process responsible
**  for network traffic. Written in DTrace (Solaris 10 build 63).
**
** iosnoop.d - A program to print I/O events as they happen, with useful
**      details such as UID, PID, inode, command, etc.
**      Written in DTrace (Solaris 10 build 63).
**
*/

#pragma D option quiet


/*
** --- TIMESTAMPS ---
*/
dtrace:::BEGIN {
        printf("B %d\n",timestamp);
        /* last is used as a timestamp to the disk request, OR,
           to the last disk completion. This is needed to avoid
           over counting disk times due to disk buffers (queues),
           however remains a minor simplification. */
        last = timestamp;
}
io:::done
{
        printf("D %d %d %d %d %s\n",
         this->suid,this->spid,this->delta,args[0]->b_bcount,
         this->scomm == 0 ? "." : stringof(this->scomm));
}


/*
** --- NETWORK ----
*/

/*
**  Store Write Values
*/
fbt:ip:tcp_output:entry
{
        self->uid = curpsinfo->pr_euid;
        self->pid = pid;
        self->comm = (char *)curpsinfo->pr_fname;
        self->size = msgdsize(args[1]);
        self->ok = 1;
}

/*
**  Store Read Values
*/
fbt:sockfs:sotpi_recvmsg:entry
{
        self->uid = curpsinfo->pr_euid;
        self->pid = pid;
        self->comm = (char *)curpsinfo->pr_fname;
        /* We track the read request (man uio), */
        self->uiop = (struct uio *) arg2;
        self->residual = self->uiop->uio_resid;
        /* The following ensures the type is AF_INET (sys/socket.h), */
        this->sonode = (struct sonode *)arg0;
        self->ok = (int)this->sonode->so_type == 2 ? 1 : 0;
}
fbt:sockfs:sotpi_recvmsg:return
/arg0 != 0 && self->ok/
{
        /* calculate successful read size */
        self->size = self->residual - self->uiop->uio_resid;
}

/*
**  Print output
*/
fbt:ip:tcp_output:entry, fbt:sockfs:sotpi_recvmsg:return
/self->ok/
{
        printf("N %d %d %d %s\n",self->uid,self->pid,
         self->size,stringof(self->comm));
        self->ok = 0;
        self->uid = 0;
        self->pid = 0;
        self->comm = 0;
        self->size = 0;
        self->residual = 0;
        self->uiop = 0;
}
: probe description dtrace:::BEGIN does not match any probes

Actually what the error is printing on screen is the code inside Prustat after _DATA_ line

Code:
uname -r

output on global and zone as below,
Global:5.11
zone:5.10

I have tried setting
Code:
limitpriv="default,dtrace_proc,dtrace_user"

to the zone. But still not working

TIA
 

8 More Discussions You Might Find Interesting

1. Solaris

Global Zones

I'm logged into a non-global zone server. How would I find out what the global zone server name is from there? (1 Reply)
Discussion started by: soupbone38
1 Replies

2. Solaris

Global zones - not allow log via SSH

Hi, I have Global zone and 2 users: root and app. I know password root and app. When a user app log - putty displays Access denied Using keyboard-interactive authentication. In file /etc/security/policy.conf I set CRYPT_DEFAULT=2a And in file /etc/ssh/sshd_config I set PermitRootLogin... (1 Reply)
Discussion started by: bieszczaders
1 Replies

3. Solaris

How to access ENV variables of non global zones in global zone???

Hi Guys, My requirement is I have file called /opt/orahome/.profile in non global zone. PATH=/usr/bin:/usr/ucb:/etc:/usr/sbin:/usr/local/bin:/usr/openwin/bin:. export PATH PS1="\${ORACLE_SID}:`hostname`:\$PWD$ " export PS1 EDITOR=vi export EDITOR ENV=/opt/orahome/.kshrc export ENV... (1 Reply)
Discussion started by: vijaysachin
1 Replies

4. Solaris

How to see global hostname by logging in non global zones?

Hi guru Could any one help me by letting me know, how to see global hostname by logging in non global zones Regards (2 Replies)
Discussion started by: girish.batra
2 Replies

5. Solaris

How to share/mount ZFS in two non-global zones?

Hi All, first time here. :o I need a some assistance with ZFS. I have two ZFS pools: zoneA/nfs_export zoneB/nfs_export Each dataset is mounted in a particular zone (zoneA and zoneB respectively). I have created a new dataset "zoneA/nfs_tmp" which I want to mount or share... (8 Replies)
Discussion started by: gabriel4
8 Replies

6. Solaris

cpu- requirements for non-global zones

Hello Admins, Does anyone has any idea on how to assign no. of cpu and memory to non-global zones on solaris 10..... We have few zones in our environment. We wanted to assign memory and no of cpu's ..(e.g. 4Gb / 2 CPU's) Thanks... (4 Replies)
Discussion started by: snchaudhari2
4 Replies

7. Solaris

Solaris 10 - rexplorer and Non-Global zones

Hi all - not really a problem as such, but just hoping someone can shed some light. We point rexplorer to multiple Global zones and it works as expected. However, each Non-Global zone get around a hundred of root su'ing to root messages, i.e.: SU 07/14 03:02 + ??? root-root SU 07/14 03:02 +... (5 Replies)
Discussion started by: dlam
5 Replies

8. Solaris

Solaris Global/Zones patching

Issue is : We have Solaris Global with 12 Zones and some have 15 Zones. All the OS version are10. Is it possible to apply patch at Zone level instead of patching at Global level? Please let me know. (10 Replies)
Discussion started by: baladelaware73
10 Replies
PERLDTRACE(1)						 Perl Programmers Reference Guide					     PERLDTRACE(1)

NAME
perldtrace - Perl's support for DTrace SYNOPSIS
# dtrace -Zn 'perl::sub-entry, perl::sub-return { trace(copyinstr(arg0)) }' dtrace: description 'perl::sub-entry, perl::sub-return ' matched 10 probes # perl -E 'sub outer { inner(@_) } sub inner { say shift } outer("hello")' hello (dtrace output) CPU ID FUNCTION:NAME 0 75915 Perl_pp_entersub:sub-entry BEGIN 0 75915 Perl_pp_entersub:sub-entry import 0 75922 Perl_pp_leavesub:sub-return import 0 75922 Perl_pp_leavesub:sub-return BEGIN 0 75915 Perl_pp_entersub:sub-entry outer 0 75915 Perl_pp_entersub:sub-entry inner 0 75922 Perl_pp_leavesub:sub-return inner 0 75922 Perl_pp_leavesub:sub-return outer DESCRIPTION
DTrace is a framework for comprehensive system- and application-level tracing. Perl is a DTrace provider, meaning it exposes several probes for instrumentation. You can use these in conjunction with kernel-level probes, as well as probes from other providers such as MySQL, in order to diagnose software defects, or even just your application's bottlenecks. Perl must be compiled with the "-Dusedtrace" option in order to make use of the provided probes. While DTrace aims to have no overhead when its instrumentation is not active, Perl's support itself cannot uphold that guarantee, so it is built without DTrace probes under most systems. One notable exception is that Mac OS X ships a /usr/bin/perl with DTrace support enabled. HISTORY
5.10.1 Perl's initial DTrace support was added, providing "sub-entry" and "sub-return" probes. 5.14.0 The "sub-entry" and "sub-return" probes gain a fourth argument: the package name of the function. 5.16.0 The "phase-change" probe was added. 5.18.0 The "op-entry", "loading-file", and "loaded-file" probes were added. PROBES
sub-entry(SUBNAME, FILE, LINE, PACKAGE) Traces the entry of any subroutine. Note that all of the variables refer to the subroutine that is being invoked; there is currently no way to get ahold of any information about the subroutine's caller from a DTrace action. :*perl*::sub-entry { printf("%s::%s entered at %s line %d ", copyinstr(arg3), copyinstr(arg0), copyinstr(arg1), arg2); } sub-return(SUBNAME, FILE, LINE, PACKAGE) Traces the exit of any subroutine. Note that all of the variables refer to the subroutine that is returning; there is currently no way to get ahold of any information about the subroutine's caller from a DTrace action. :*perl*::sub-return { printf("%s::%s returned at %s line %d ", copyinstr(arg3), copyinstr(arg0), copyinstr(arg1), arg2); } phase-change(NEWPHASE, OLDPHASE) Traces changes to Perl's interpreter state. You can internalize this as tracing changes to Perl's "${^GLOBAL_PHASE}" variable, especially since the values for "NEWPHASE" and "OLDPHASE" are the strings that "${^GLOBAL_PHASE}" reports. :*perl*::phase-change { printf("Phase changed from %s to %s ", copyinstr(arg1), copyinstr(arg0)); } op-entry(OPNAME) Traces the execution of each opcode in the Perl runloop. This probe is fired before the opcode is executed. When the Perl debugger is enabled, the DTrace probe is fired after the debugger hooks (but still before the opcode itself is executed). :*perl*::op-entry { printf("About to execute opcode %s ", copyinstr(arg0)); } loading-file(FILENAME) Fires when Perl is about to load an individual file, whether from "use", "require", or "do". This probe fires before the file is read from disk. The filename argument is converted to local filesystem paths instead of providing "Module::Name"-style names. :*perl*:loading-file { printf("About to load %s ", copyinstr(arg0)); } loaded-file(FILENAME) Fires when Perl has successfully loaded an individual file, whether from "use", "require", or "do". This probe fires after the file is read from disk and its contentss evaluated. The filename argument is converted to local filesystem paths instead of providing "Module::Name"-style names. :*perl*:loaded-file { printf("Successfully loaded %s ", copyinstr(arg0)); } EXAMPLES
Most frequently called functions # dtrace -qZn 'sub-entry { @[strjoin(strjoin(copyinstr(arg3),"::"),copyinstr(arg0))] = count() } END {trunc(@, 10)}' Class::MOP::Attribute::slots 400 Try::Tiny::catch 411 Try::Tiny::try 411 Class::MOP::Instance::inline_slot_access 451 Class::MOP::Class::Immutable::Trait:::around 472 Class::MOP::Mixin::AttributeCore::has_initializer 496 Class::MOP::Method::Wrapped::__ANON__ 544 Class::MOP::Package::_package_stash 737 Class::MOP::Class::initialize 1128 Class::MOP::get_metaclass_by_name 1204 Trace function calls # dtrace -qFZn 'sub-entry, sub-return { trace(copyinstr(arg0)) }' 0 -> Perl_pp_entersub BEGIN 0 <- Perl_pp_leavesub BEGIN 0 -> Perl_pp_entersub BEGIN 0 -> Perl_pp_entersub import 0 <- Perl_pp_leavesub import 0 <- Perl_pp_leavesub BEGIN 0 -> Perl_pp_entersub BEGIN 0 -> Perl_pp_entersub dress 0 <- Perl_pp_leavesub dress 0 -> Perl_pp_entersub dirty 0 <- Perl_pp_leavesub dirty 0 -> Perl_pp_entersub whiten 0 <- Perl_pp_leavesub whiten 0 <- Perl_dounwind BEGIN Function calls during interpreter cleanup # dtrace -Zn 'phase-change /copyinstr(arg0) == "END"/ { self->ending = 1 } sub-entry /self->ending/ { trace(copyinstr(arg0)) }' CPU ID FUNCTION:NAME 1 77214 Perl_pp_entersub:sub-entry END 1 77214 Perl_pp_entersub:sub-entry END 1 77214 Perl_pp_entersub:sub-entry cleanup 1 77214 Perl_pp_entersub:sub-entry _force_writable 1 77214 Perl_pp_entersub:sub-entry _force_writable System calls at compile time # dtrace -qZn 'phase-change /copyinstr(arg0) == "START"/ { self->interesting = 1 } phase-change /copyinstr(arg0) == "RUN"/ { self->interesting = 0 } syscall::: /self->interesting/ { @[probefunc] = count() } END { trunc(@, 3) }' lseek 310 read 374 stat64 1056 Perl functions that execute the most opcodes # dtrace -qZn 'sub-entry { self->fqn = strjoin(copyinstr(arg3), strjoin("::", copyinstr(arg0))) } op-entry /self->fqn != ""/ { @[self->fqn] = count() } END { trunc(@, 3) }' warnings::unimport 4589 Exporter::Heavy::_rebuild_cache 5039 Exporter::import 14578 REFERENCES
DTrace Dynamic Tracing Guide <http://dtrace.org/guide/preface.html> DTrace: Dynamic Tracing in Oracle Solaris, Mac OS X and FreeBSD <http://www.amazon.com/DTrace-Dynamic-Tracing-Solaris-FreeBSD/dp/0132091518/> SEE ALSO
Devel::DTrace::Provider This CPAN module lets you create application-level DTrace probes written in Perl. AUTHORS
Shawn M Moore "sartak@gmail.com" perl v5.18.2 2014-01-06 PERLDTRACE(1)
All times are GMT -4. The time now is 03:00 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy