Re: [vox-tech] Measure network usage?

2003-06-30 Thread MB
I like ntop ( www.ntop.org ).  It has a nice SSL server w/interface and 
graphs to view what is going on, and it uses nmap, lsof, and several 
other network utilities to find out about the machines on the network ( 
and the remote connections )

Mark

Shawn P. Neugebauer wrote:

On Saturday 28 June 2003 01:50 am, Samuel Merritt wrote:
 

Shawn P. Neugebauer said:
   

I have a few Linux boxes that have uptimes of days to months.  I need
to try to estimate bandwidth usage for a long-ish period of time (e.g.,
days or weeks) in order to characterize how much bandwidth I use
(to decide on level-of-service issues for a new ISP---I have to move :(
) .   Is there a way to tell the amount (in bytes) of traffic sent and
received by a running box?  Is there a simple *non-intrusive* tool that
might "add a little value" to whatever is built-in?  I'm aware of MRTG,
and Orca, but these are overkill for this type of problem.
 

Take a look at the output of /sbin/ifconfig. It should have a line like
RX bytes:2328595615 (2.1 GiB)  TX bytes:3104087047 (2.8 GiB)
or so. Have a script dump the byte counts to a text file once an hour, and
then you can do a little simple analysis with a hand-rolled tool.
   

That was the first place I checked, but 
I saw RX/TX packets and missed the byte count.  I just man'd ifconfig,
noticed it used /proc/net/dev, saw byte counts in *there* and started
wondering why they didn't show up with ifconfig...
Now, if I can extract some info from my router, I might have some idea how
much data exits and arrives at my network...
Thanks.
___
vox-tech mailing list
[EMAIL PROTECTED]
http://lists.lugod.org/mailman/listinfo/vox-tech
 



___
vox-tech mailing list
[EMAIL PROTECTED]
http://lists.lugod.org/mailman/listinfo/vox-tech


Re: [vox-tech] Compiling C into Java bytecode?

2003-06-30 Thread Bill Kendrick
On Mon, Jun 30, 2003 at 11:43:49AM -0700, Rod Roark wrote:
> Well then let's consider my comment to refer to C as it
> was defined by Kernighan and Ritchie.  If they don't count
> any more, I give up.

Meh... What did K&R ever give _us_?!

;^)

-bill!

-- 
[EMAIL PROTECTED]   Got kids?  Get Tux Paint! 
http://newbreedsoftware.com/bill/   http://newbreedsoftware.com/tuxpaint/
___
vox-tech mailing list
[EMAIL PROTECTED]
http://lists.lugod.org/mailman/listinfo/vox-tech


RE: [vox-tech] VNC at 1024x768 resolution??

2003-06-30 Thread Seth Nagao

IIRC, the option to pass to the VNC server is something like this:

vncserver  -geometry 1024x768

HTH,

--Seth

> 
> Hello
> 
> I am accessing a Linux system via the VNC server.  The VNC client is 
running on
> Win2K.  After the connection is established, the VNC client window opens 
up as
> a 800x600 window.  The XF86Config is using the resolution at 1024x768.  
Some of
> the items from the Linux system are going beyond the VNC client boundry. 
When I
> try to maximize the window, the display is still at 800x600 with broad 
dark
> strips around the window.
> 
> The display resolution on Win2K is greater than the 1024x768 resolution. 
> 
> How can I increase my VNC Client to show the Linux system at 1024x768
> resolution?
> 
> Thank you in advance.
> 
> -- 
> Subba Rao
> [EMAIL PROTECTED]
> -
-
> Old American Wild West saying:   God created men but Colt made them 
equal.
> Today:  Linus created Linux and Linux made IT companies 
equal.
> ___
> vox-tech mailing list
> [EMAIL PROTECTED]
> http://lists.lugod.org/mailman/listinfo/vox-tech
> 
___
vox-tech mailing list
[EMAIL PROTECTED]
http://lists.lugod.org/mailman/listinfo/vox-tech


Re: [vox-tech] Compiling C into Java bytecode?

2003-06-30 Thread Micah J. Cowan
> as for the quote above, i have two comments:
> 
> 1. you cannot logically infer that the std library is a part of the
>library.

I'm assuming the second "library" was meant to be "language"; and I
have to politely disagree with you there.

The scope section of ISO international standards are intended to
completely and entirely convey the scope and content of the
document. If it says that this standard specifies A, and does not
elaborate, then that is all the standard does.

I understand the reasoning you probably mean, though: under many
circumstances, a sentence such as the above could break down to:

  A contains B

which, obviously, does not preclude the possibility that

  A contains C

for any C. However, things don't really work that way with standards
for the most part; certainly, every regular I know in comp.lang.c
reads it as

  A *is* B.

Which would imply that the standard library is part of the language
definition.

This is also far from unusual (BTW, I was wrong about C++ - it too
includes the library facility definitions as part of the language
definition as a whole). It has been pretty common in language
specifications to consider the entire specification to define a
language, and for that specification to include a standard library
which is considered part of the language.

Incidentally, K&R has not been the authoritative definition of the C
language since 1989, when it was first standardized by ANSI (and, in
the following year, by ISO).

-Micah
___
vox-tech mailing list
[EMAIL PROTECTED]
http://lists.lugod.org/mailman/listinfo/vox-tech


Re: [vox-tech] Compiling C into Java bytecode?

2003-06-30 Thread Ricardo Anguiano
Bill Kendrick <[EMAIL PROTECTED]> writes:
> Okay, just out of curiosity.  Say one wanted to create a 'Java
> application' (e.g., something that runs in a web browser, cell phone
> or PDA JVM), but they wanted to write the application using the C
> /language/.

Makes me think of SWIG. Make multilanguage apps.

http://www.swig.org/ 

It's usually for scripting languages interfacing to C or vice-versa,
but it also does C to Java.  It's about all I know about that.

> This is possible, is it not?  If so, are there some tools for this
> under Linux?  (I see "gjc", the Java compiler from GNU, as well as
> "gij", the Java bytecode interpreter from GNU; but nothing for
> taking code in other programming languages and turning them into
> Java bytecode)

In a nutshell, language translation tools are hard to get right or to
even do most of the work.  Here's a paper that describes work
translating from C++ to Java:

http://seclab.cs.ucdavis.edu/~devanbu/dp.tex.pdf

Now do it in reverse, and un-object-ify it. That would be a nice
paper, or thesis even.  :)

Cheers,
-- 
Ricardo Anguiano 
http://www.codesourcery.com
___
vox-tech mailing list
[EMAIL PROTECTED]
http://lists.lugod.org/mailman/listinfo/vox-tech


Re: [vox-tech] Compiling C into Java bytecode?

2003-06-30 Thread Peter Jay Salzman
On Mon 30 Jun 03, 11:29 AM, Micah J. Cowan <[EMAIL PROTECTED]> said:
> On Mon, Jun 30, 2003 at 10:37:15AM -0700, Rod Roark wrote:
> > 
> > Do you have a reference for that?  I always thought that
> > language by definition does not include libraries.  Perhaps
> > the standard you are referring to covers more than just the
> > language.
> 
> The usual reference the first sentence of the first paragraph of the
> first section ("Scope") of the standard, which states:
> 
>   This International Standard specifies the form and establishes the
>   interpretation of programs written in the C programming language.
> 
> Yet, this standard provides a clause detailing all standard C library
> facilities. It is generally accepted among comp.lang.c regulars that
> the standard C library is part of the language itself, according to
> the language of the standard.
 
the two of you are talking about two different standards.

K+R very explicitly say:

   - there are no input/output functions in C.
   - there are no functions that perform file operations in C.
   - the std C library is NOT a part of the language proper.

of course, when they wrote the book, there was no C99.


as for the quote above, i have two comments:

1. you cannot logically infer that the std library is a part of the
   library.

2. however, i would agree that it's probably the intent of whoever wrote
   that sentence.

pete

-- 
GPG Instructions: http://www.dirac.org/linux/gpg
GPG Fingerprint: B9F1 6CF3 47C4 7CD8 D33E 70A9 A3B9 1945 67EA 951D
___
vox-tech mailing list
[EMAIL PROTECTED]
http://lists.lugod.org/mailman/listinfo/vox-tech


Re: [vox-tech] Compiling C into Java bytecode?

2003-06-30 Thread Rod Roark
Well then let's consider my comment to refer to C as it
was defined by Kernighan and Ritchie.  If they don't count
any more, I give up.

-- Rod

On Monday 30 June 2003 11:29 am, Micah J. Cowan wrote:
> On Mon, Jun 30, 2003 at 10:37:15AM -0700, Rod Roark wrote:
> > On Monday 30 June 2003 10:07 am, Micah J. Cowan wrote:
> > > On Sun, Jun 29, 2003 at 06:27:08PM -0700, Rod Roark wrote:
> > > > On Sunday 29 June 2003 02:06 pm, Ken Bloom wrote:
> > > > > Second, their
> > > > > standard libraries have very different names for most things (even
> > > > > something so simple as the sine function has two different
> > > > > incompatible lines to call it in the two different languages - in c
> > > > > it's sin() , and in java it's Math.sine() ). So I can't even
> > > > > copy/paste strictly mathematical functions between the two
> > > > > languages.
> > > >
> > > > Technically, libraries are not part of the language.
> > >
> > > Not from the standpoint of your typical language spec (at least for
> > > C). The C standard specifies the standard library as part of the
> > > language; though I seem to recall that C++ seperates them more
> > > distinctly in the language.
> >
> > Do you have a reference for that?  I always thought that
> > language by definition does not include libraries.  Perhaps
> > the standard you are referring to covers more than just the
> > language.
>
> The usual reference the first sentence of the first paragraph of the
> first section ("Scope") of the standard, which states:
>
>   This International Standard specifies the form and establishes the
>   interpretation of programs written in the C programming language.
>
> Yet, this standard provides a clause detailing all standard C library
> facilities. It is generally accepted among comp.lang.c regulars that
> the standard C library is part of the language itself, according to
> the language of the standard.
>
> For corroborations from respected regulars of comp.lang.c, including
> Dan Pop, who while sometimes rather rude has the reputation of
> near-inscrutability in issues regarding the C language and standard
> (pick arguments with him at your own risk: he tends to fight dirty,
> and he's nearly always right); and Chris Torek, responsible for
> writing huge portions of the FreeBSD C and system libraries:
>
>  
> http://groups.google.com/groups?selm=9606231913.AA17433%40ues5.cern.ch&rnum
>=1
>
>  
> http://groups.google.com/groups?selm=97i9i0%242f3%241%40elf.bsdi.com&rnum=1
>
>  
> http://groups.google.com/groups?selm=885344571snz%40genesis.demon.co.uk&rnu
>m=58
>
> -Micah

___
vox-tech mailing list
[EMAIL PROTECTED]
http://lists.lugod.org/mailman/listinfo/vox-tech


Re: [vox-tech] Compiling C into Java bytecode?

2003-06-30 Thread Micah J. Cowan
On Mon, Jun 30, 2003 at 10:37:15AM -0700, Rod Roark wrote:
> On Monday 30 June 2003 10:07 am, Micah J. Cowan wrote:
> > On Sun, Jun 29, 2003 at 06:27:08PM -0700, Rod Roark wrote:
> > > On Sunday 29 June 2003 02:06 pm, Ken Bloom wrote:
> > > > Second, their
> > > > standard libraries have very different names for most things (even
> > > > something so simple as the sine function has two different incompatible
> > > > lines to call it in the two different languages - in c it's sin() , and
> > > > in java it's Math.sine() ). So I can't even copy/paste strictly
> > > > mathematical functions between the two languages.
> > >
> > > Technically, libraries are not part of the language.
> >
> > Not from the standpoint of your typical language spec (at least for
> > C). The C standard specifies the standard library as part of the
> > language; though I seem to recall that C++ seperates them more
> > distinctly in the language.
> 
> Do you have a reference for that?  I always thought that
> language by definition does not include libraries.  Perhaps
> the standard you are referring to covers more than just the
> language.

The usual reference the first sentence of the first paragraph of the
first section ("Scope") of the standard, which states:

  This International Standard specifies the form and establishes the
  interpretation of programs written in the C programming language.

Yet, this standard provides a clause detailing all standard C library
facilities. It is generally accepted among comp.lang.c regulars that
the standard C library is part of the language itself, according to
the language of the standard.

For corroborations from respected regulars of comp.lang.c, including
Dan Pop, who while sometimes rather rude has the reputation of
near-inscrutability in issues regarding the C language and standard
(pick arguments with him at your own risk: he tends to fight dirty,
and he's nearly always right); and Chris Torek, responsible for
writing huge portions of the FreeBSD C and system libraries:

  http://groups.google.com/groups?selm=9606231913.AA17433%40ues5.cern.ch&rnum=1

  http://groups.google.com/groups?selm=97i9i0%242f3%241%40elf.bsdi.com&rnum=1

  http://groups.google.com/groups?selm=885344571snz%40genesis.demon.co.uk&rnum=58

-Micah

___
vox-tech mailing list
[EMAIL PROTECTED]
http://lists.lugod.org/mailman/listinfo/vox-tech


[vox-tech] VNC at 1024x768 resolution??

2003-06-30 Thread Subba Rao

Hello

I am accessing a Linux system via the VNC server.  The VNC client is running on
Win2K.  After the connection is established, the VNC client window opens up as
a 800x600 window.  The XF86Config is using the resolution at 1024x768.  Some of
the items from the Linux system are going beyond the VNC client boundry. When I
try to maximize the window, the display is still at 800x600 with broad dark
strips around the window.

The display resolution on Win2K is greater than the 1024x768 resolution. 

How can I increase my VNC Client to show the Linux system at 1024x768
resolution?

Thank you in advance.

-- 
Subba Rao
[EMAIL PROTECTED]
--
Old American Wild West saying:   God created men but Colt made them equal.
Today:  Linus created Linux and Linux made IT companies equal.
___
vox-tech mailing list
[EMAIL PROTECTED]
http://lists.lugod.org/mailman/listinfo/vox-tech


Re: [vox-tech] Compiling C into Java bytecode?

2003-06-30 Thread Rod Roark
On Monday 30 June 2003 10:07 am, Micah J. Cowan wrote:
> On Sun, Jun 29, 2003 at 06:27:08PM -0700, Rod Roark wrote:
> > On Sunday 29 June 2003 02:06 pm, Ken Bloom wrote:
> > > Second, their
> > > standard libraries have very different names for most things (even
> > > something so simple as the sine function has two different incompatible
> > > lines to call it in the two different languages - in c it's sin() , and
> > > in java it's Math.sine() ). So I can't even copy/paste strictly
> > > mathematical functions between the two languages.
> >
> > Technically, libraries are not part of the language.
>
> Not from the standpoint of your typical language spec (at least for
> C). The C standard specifies the standard library as part of the
> language; though I seem to recall that C++ seperates them more
> distinctly in the language.

Do you have a reference for that?  I always thought that
language by definition does not include libraries.  Perhaps
the standard you are referring to covers more than just the
language.

For example my old K&R says: "Input and output facilities
are not part of the C language, so we have de-emphasized
them in our presentation thus far"

--
Rod Roark, Sunset Systems http://www.sunsetsystems.com/
Offering preconfigured Linux computers, custom software and
remote system administration services.
Public Key: http://www.sunsetsystems.com/rodspublickey.asc

___
vox-tech mailing list
[EMAIL PROTECTED]
http://lists.lugod.org/mailman/listinfo/vox-tech


Re: [vox-tech] Compiling C into Java bytecode?

2003-06-30 Thread Matt Roper
On Mon, Jun 30, 2003 at 10:05:24AM -0700, Micah J. Cowan wrote:
> On Sun, Jun 29, 2003 at 01:07:24PM -0700, Michael Wenk wrote:
> > On Sunday 29 June 2003 02:32 am, Bill Kendrick wrote:
> > > Okay, just out of curiosity.  Say one wanted to create a 'Java application'
> > > (e.g., something that runs in a web browser, cell phone or PDA JVM),
> > > but they wanted to write the application using the C /language/.
> > >
> > > This is possible, is it not?  If so, are there some tools for this
> > > under Linux?  (I see "gjc", the Java compiler from GNU, as well as
> > > "gij", the Java bytecode interpreter from GNU; but nothing for
> > > taking code in other programming languages and turning them into Java
> > > bytecode)
> > >
> > > Thx!
> > >
> > > -bill!
> > 
> > The biggest problem would be language features.  C allows you to many things 
> > java does not.  You'd probably spend more time trying to debug your 
> > javabytecodes on whatever system you're developing than you would learning 
> > java syntax.  Also, even if you wanted to use C, you would still have to 
> > learn the Java API(or write your own, which would be difficult to do), and 
> > how to call API classes from within the language.  
> 
> This would be a problem if you were compiling C source into Java
> source; but AIUI the JVM is a pretty complete virtual representation
> of an actual machine; you should be able to use all features you
> normally have in C.
...

I don't think this is true.  The JVM is a virtual representation of
a _stack-based_ machine (i.e. it doesn't have any notion of memory
addresses) so I don't think it can do a lot of the pointer arithmetic
that you often find in C code.


Matt

-- 

*
* Matt Roper <[EMAIL PROTECTED]>*
* http://www.mattrope.com   *
* PGP Key: http://www.mattrope.com/mattrope.asc *
*
___
vox-tech mailing list
[EMAIL PROTECTED]
http://lists.lugod.org/mailman/listinfo/vox-tech


Re: [vox-tech] Compiling C into Java bytecode?

2003-06-30 Thread Micah J. Cowan
On Sun, Jun 29, 2003 at 06:27:08PM -0700, Rod Roark wrote:
> On Sunday 29 June 2003 02:06 pm, Ken Bloom wrote:
> > Second, their
> > standard libraries have very different names for most things (even
> > something so simple as the sine function has two different incompatible
> > lines to call it in the two different languages - in c it's sin() , and
> > in java it's Math.sine() ). So I can't even copy/paste strictly
> > mathematical functions between the two languages.
> 
> Technically, libraries are not part of the language.

Not from the standpoint of your typical language spec (at least for
C). The C standard specifies the standard library as part of the
language; though I seem to recall that C++ seperates them more
distinctly in the language.
___
vox-tech mailing list
[EMAIL PROTECTED]
http://lists.lugod.org/mailman/listinfo/vox-tech


Re: [vox-tech] Compiling C into Java bytecode?

2003-06-30 Thread Micah J. Cowan
On Sun, Jun 29, 2003 at 01:07:24PM -0700, Michael Wenk wrote:
> On Sunday 29 June 2003 02:32 am, Bill Kendrick wrote:
> > Okay, just out of curiosity.  Say one wanted to create a 'Java application'
> > (e.g., something that runs in a web browser, cell phone or PDA JVM),
> > but they wanted to write the application using the C /language/.
> >
> > This is possible, is it not?  If so, are there some tools for this
> > under Linux?  (I see "gjc", the Java compiler from GNU, as well as
> > "gij", the Java bytecode interpreter from GNU; but nothing for
> > taking code in other programming languages and turning them into Java
> > bytecode)
> >
> > Thx!
> >
> > -bill!
> 
> The biggest problem would be language features.  C allows you to many things 
> java does not.  You'd probably spend more time trying to debug your 
> javabytecodes on whatever system you're developing than you would learning 
> java syntax.  Also, even if you wanted to use C, you would still have to 
> learn the Java API(or write your own, which would be difficult to do), and 
> how to call API classes from within the language.  

This would be a problem if you were compiling C source into Java
source; but AIUI the JVM is a pretty complete virtual representation
of an actual machine; you should be able to use all features you
normally have in C.

But it'd either have to be a freestanding (think "embedded")
implementation, or you'd need a decent implementation of the standard
C library in javacode.

-Micah
___
vox-tech mailing list
[EMAIL PROTECTED]
http://lists.lugod.org/mailman/listinfo/vox-tech