Mail Archives: cygwin/2002/07/26/17:58:47
On Fri, 26 Jul 2002 11:44:03 -0400 (EDT)
Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu> wrote:
> Jim,
> First off, it would be nice if your reply went directly to the list
> instead of to me personally. This is less of a criticism for you, and
> more of a note to the list maintainers -- I thought the Reply-To:
> field would be set correctly when a message comes from the list. Oh,
> well, I'll just set it manually.
> More below...
>
> On Thu, 25 Jul 2002, Jim George wrote:
>
> > On Thu, 25 Jul 2002 11:57:51 -0400 (EDT)
> > Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu> wrote:
> >
> > > On Thu, 25 Jul 2002, Greg McCrory wrote:
> > >
> > > > At 7/24/2002 11:38 PM -0400, Igor Pechtchanski wrote:
> > > > >On Wed, 24 Jul 2002, Jim George wrote:
> > > > >
> > > > >Jim,
> > > > >
> > > > >I did a google search on "linux top cpu load". Here's a top from the
> > > > >first match: http://www.groupsys.com/topsrc/top-3.5beta9.tar.gz
> > > > >It took about an hour to make it compile and run under cygwin 1.3.12-2 on
> > > > >Win2k. The patch is attached.
> > > > >
> > > > >Note: I just compiled and ran the code; I haven't verified the correctness
> > > > >of the output. It seemed to work without crashing, and the output looked
> > > > >plausible. I also haven't tested it on any system other than mine (above).
> > > > >Try it at your own risk.
> > > > > Igor
> > > >
> > > > Notes on my quick attempt this morning:
> > > >
> > > > To get the ./Configure to run properly I needed a symbolic link to tcsh:
> > > > ln -s /bin/tcsh /bin/csh
> > >
> > > Right, I have that too (from way back, no wonder I forgot to mention it).
> > >
> > > > Also chose module linux when asked.
> > >
> > > Yep. Again, should have said that.
> > >
> > > > for owner, used SYSTEM instead of default root
> > >
> > > chown and chgrp didn't seem to work for me at all. However, I don't have
> > > a CYGWIN variable, so that might be the reason. I don't miss it, though.
> > >
> > > > install script did not move the executable into the proper directory:
> > >
> > > I used /usr/bin/install as the install command.
> > >
> > > > ./install -o SYSTEM -m 4711 -g SYSTEM top /usr/local/bin
> > > > chown: changing ownership of `/usr/local/bin/top': No such file or directory
> > > > chgrp: changing group of `/usr/local/bin/top': No such file or directory
> > > > chmod: changing permissions of `/usr/local/bin/top': No such file or directory
> > > > make: *** [install-top] Error 1
> > >
> > > See http://cygwin.com/cygwin-ug-net/using-specialnames.html#AEN644
> > > It may be necessary to use the local script after all, and re-write it to
> > > boot.
> > >
> > > > I was able to install it manually and it appears to work.
> > > > GMc
> > >
> > > Not quite correctly -- see
> > > http://cygwin.com/ml/cygwin/2002-07/msg01995.html
> > > Igor
> > Hi everyone,
> >
> > well I got as far as compiling and installing, in the same way
> > that Greg did, but...
> >
> > When I run top I get the following error..
> >
> > top: proc filesystem not mounted on /proc
> > type = 6
> >
> > The output of mount is..
> > [snip]
> > Can anyone tell me what I've done wrong? Do I need to explicitly
> > mount /proc?
>
> No, /proc is a virtual filesystem that is already mounted. However, top
> checks something called a PROC_SUPER_MAGIC, which is a compile-time
> constant, but seems to be different for every system. The value in the
> patch is for my system only (as I repeatedly said). To determine what the
> value is on your system, edit machine.c, and insert fprintf(stderr, "
> type=%x\n", sb.f_type); in machine_init, right after it prints out the
> above error message (but before the return). Then recompile and run.
> It'll still fail, but now you'll know what the value of PROC_SUPER_MAGIC
> is for your system. Edit machine.c and change the #define of
> PROC_SUPER_MAGIC from 0x9fa0 (the value for my system) to whatever it is
> on yours. Recompile, and top should work.
> I know this is tedious and non-portable. Someone who knows how the value
> is actually derived on each machine can come up with a better way.
> Igor
Igor,
I went to make the change to machine.c that you suggested but the entry is already there right before the error return.
When I run top I get the type=6, so what is the number I should replace 0x9fa0 with, 0x0006?
Regards,
Jim
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -