[Orca-dev] orcallator needing to be root - removing the warning for non-root users. Solved.
Rusty Carruth
rcarruth at tempe.tt.slb.com
Thu Oct 4 15:39:42 PDT 2001
Blair Zajac <blair at orcaware.com> wrote:
> Send the diffs to the list. Also, use 'diff -u' instead of -c as they are
> easier to read.
>
> Also, can you try uncommenting
>
> #define USE_RAWDISK 1
>
> and see if the problem goes away?
First thing was I had to go change all the 'ifdef USE_CPU' and so forth
to simple #if USE_CPU, since I interpreted the key to be 0/1 as opposed
to defined/undefined. By doing that, I could get orcallator to load
without the warning, once turning off all #defines (as you'll see in
my simple diff below).
Without those changes I had lots of compile errors.
In case you want to do it that way I'll include the simple diff
at the end.
Finally - I can unequivocally state the the warning message comes from
se BEFORE execution start because something in orcallator wants kvm.
(At this point, I'm of the opinion that its not a bug, its a feature.
I'm obviously asking for something I cannot get. The current behaviour,
i.e. its warning but continuing (and apparently returning zero) is much
to be desired over dying with no real hope of figuring it out ;-)
Ok, now REALLY finally, here is the define which requires kvm (drumroll please):
WATCH_CPU
So, indeed '#define WATCH_CPU 0' will turn off the warning. Just as Blair
had expected. I was just undefining it the wrong way.
In fact, had I not been misdirected by the '#define <foo> 1' to change
it to '#define <foo> 0' I'd probably not ever had had this whole
experience of tracking down the WATCH_CPU <-> warning map....
(Which implies to me that perhaps my 'patch' back earlier today
should have had a warning to NOT define the WATCH_<foo> things
if you do not want them watched, and not to define them as zero
as the code implied... Ah, hindsight, I love it ;-)
Here is a REALLY short patch that might help folks like me
not go off on that if/ifdef rabbit trail:
#define MAX_COLUMNS 512
// Define the different parts of the system you want to examine.
+ // Be sure to NOT define them (i.e. '#undef' them) if you DON'T want
+ // that part examined. Defining them as '0' will not do what
+ // you wanted. Also, be advised that #defining WATCH_CPU
+ // will cause a warning from se if you are not running as root.
#ifdef WATCH_OS
#define WATCH_CPU 1
Sorry that its not in real patch format, but my version of solaris does
NOT have the -u option to diff)
Heres the simple diff, since context does not matter too much, of how to make
orcallator.se use the value of the #define instead of the #defined-ness
diff test_orcallator.se orcallator.se
150,162c150,162
< #define WATCH_CPU 0
< #define WATCH_MUTEX 0
< #define WATCH_NET 0
< #define WATCH_TCP 0
< #define WATCH_NFS_CLIENT 0
< #define WATCH_NFS_SERVER 0
< #define WATCH_MOUNTS 0
< #define USE_RAWDISK 0
< #define WATCH_DISK 0
< #define WATCH_DNLC 0
< #define WATCH_INODE 0
< #define WATCH_RAM 0
< #define WATCH_PAGES 0
---
> #define WATCH_CPU 1
> #define WATCH_MUTEX 1
> #define WATCH_NET 1
> #define WATCH_TCP 1
> #define WATCH_NFS_CLIENT 1
> #define WATCH_NFS_SERVER 1
> #define WATCH_MOUNTS 1
> #define USE_RAWDISK 1
> #define WATCH_DISK 1
> #define WATCH_DNLC 1
> #define WATCH_INODE 1
> #define WATCH_RAM 1
> #define WATCH_PAGES 1
194c194
< #if WATCH_MOUNTS
---
> #ifdef WATCH_MOUNTS
202c202
< #if WATCH_CPU
---
> #ifdef WATCH_CPU
290c290
< #if WATCH_TCP
---
> #ifdef WATCH_TCP
304c304
< #if WATCH_PAGES
---
> #ifdef WATCH_PAGES
323c323
< #if WATCH_CPU
---
> #ifdef WATCH_CPU
341c341
< #if WATCH_MOUNTS
---
> #ifdef WATCH_MOUNTS
346c346
< #if WATCH_NFS_SERVER
---
> #ifdef WATCH_NFS_SERVER
389c389
< #ifdef WATCH_PROXY || WATCH_SQUID || WATCH_YAHOO
---
> #if WATCH_PROXY || WATCH_SQUID || WATCH_YAHOO
395c395
< #ifdef WATCH_PROXY || WATCH_SQUID
---
> #if WATCH_PROXY || WATCH_SQUID
416c416
< #if USE_RAWDISK
---
> #ifdef USE_RAWDISK
853c849
< #if WATCH_CPU
---
> #ifdef WATCH_CPU
865c861
< #if WATCH_CPU
---
> #ifdef WATCH_CPU
945c941
< #if WATCH_TCP
---
> #ifdef WATCH_TCP
953c949
< #if WATCH_PAGES
---
> #ifdef WATCH_PAGES
959c955
< #if WATCH_NFS_SERVER
---
> #ifdef WATCH_NFS_SERVER
965c961
< #if USE_RAWDISK
---
> #ifdef USE_RAWDISK
979c975
< #if WATCH_CPU
---
> #ifdef WATCH_CPU
984c980
< #if WATCH_MUTEX
---
> #ifdef WATCH_MUTEX
989c985
< #if WATCH_MOUNTS
---
> #ifdef WATCH_MOUNTS
994c990
< #if WATCH_DISK
---
> #ifdef WATCH_DISK
999c995
< #if WATCH_RAM
---
> #ifdef WATCH_RAM
1004c1000
< #if WATCH_NET
---
> #ifdef WATCH_NET
1009c1005
< #if WATCH_TCP
---
> #ifdef WATCH_TCP
1014c1010
< #if WATCH_NFS_CLIENT
---
> #ifdef WATCH_NFS_CLIENT
1019c1015
< #if WATCH_NFS_SERVER
---
> #ifdef WATCH_NFS_SERVER
1024c1020
< #if WATCH_DNLC
---
> #ifdef WATCH_DNLC
1029c1025
< #if WATCH_INODE
---
> #ifdef WATCH_INODE
1034c1030
< #if WATCH_PAGES
---
> #ifdef WATCH_PAGES
1102c1098
< #if WATCH_CPU
---
> #ifdef WATCH_CPU
1111c1107
< #if WATCH_CPU
---
> #ifdef WATCH_CPU
1155c1151
< #if WATCH_CPU
---
> #ifdef WATCH_CPU
1191c1187
< #if WATCH_MUTEX
---
> #ifdef WATCH_MUTEX
1200c1196
< #if WATCH_NET
---
> #ifdef WATCH_NET
1242c1238
< #if WATCH_TCP
---
> #ifdef WATCH_TCP
1262c1258
< #if WATCH_NFS_CLIENT
---
> #ifdef WATCH_NFS_CLIENT
1271c1267
< #if WATCH_NFS_SERVER
---
> #ifdef WATCH_NFS_SERVER
1297c1293
< #if WATCH_MOUNTS
---
> #ifdef WATCH_MOUNTS
1385c1381
< #if WATCH_DISK
---
> #ifdef WATCH_DISK
1406c1402
< #if USE_RAWDISK
---
> #ifdef USE_RAWDISK
1464c1460
< #if WATCH_DNLC
---
> #ifdef WATCH_DNLC
1472c1468
< #if WATCH_INODE
---
> #ifdef WATCH_INODE
1481c1477
< #if WATCH_RAM
---
> #ifdef WATCH_RAM
1491c1487
< #if WATCH_PAGES
---
> #ifdef WATCH_PAGES
1513c1509
< #ifdef WATCH_PROXY || WATCH_SQUID || WATCH_YAHOO
---
> #if WATCH_PROXY || WATCH_SQUID || WATCH_YAHOO
1824c1820
< #ifdef WATCH_PROXY || WATCH_SQUID || WATCH_YAHOO
---
> #if WATCH_PROXY || WATCH_SQUID || WATCH_YAHOO
1830c1826
< #ifdef WATCH_PROXY || WATCH_SQUID || WATCH_YAHOO
---
> #if WATCH_PROXY || WATCH_SQUID || WATCH_YAHOO
1833c1829
< #ifdef WATCH_PROXY || WATCH_SQUID
---
> #if WATCH_PROXY || WATCH_SQUID
1850c1846
< #if WATCH_CPU
---
> #ifdef WATCH_CPU
1957c1953
< #ifdef WATCH_PROXY || WATCH_SQUID || WATCH_YAHOO
---
> #if WATCH_PROXY || WATCH_SQUID || WATCH_YAHOO
1999c1995
< #ifdef WATCH_PROXY || WATCH_SQUID
---
> #if WATCH_PROXY || WATCH_SQUID
Beware that I am NOT using watch_proxy, _squid, _yahoo, or _web so the
changes I made MAY adversely affect those...
rc
More information about the Orca-dev
mailing list