Re: Throughput test with iperf...

2013-09-29 Thread takCoder
hi again..

would any of you please at least explain it to me what may cause iperf
server ending up with Segmentation fault (core dumped) message right at
the beginning of setting second connection in my bi-directional throughput
test, using -r flag??

i used these commands on client and server on two freebsd machines which
are connected straight with one cat5e cable:

iperf -s -i 1
iperf -c X.Y.Z.T -t 60 -r

just getting more confused.. :(

Best Regards,
t.a.k


On Sat, Sep 28, 2013 at 10:22 AM, takCoder tak.offic...@gmail.com wrote:

 hi everyone,

 this might be a bit off-topic but i am really confused and in need of your
 helps.. :(

 i need to understand what exactly iperf does while testing network
 throughput?

 i'm trying to run a throughput+frame loss test on a router using iperf,
 and i am really confused with the definitions given for throughput and
 packet-loss and iperf output..

 as i have seen through my searches, throughput is the maximum transfer
 rate at which we have no packet loss, so i thought i have to rerun iperf
 for different transfer rate(in udp test), so i reach maximun rate while
 having no drops...

 but i have seen test videos in which they ran iperf once, with maximum
 bandwidth of the line, and just used the reported throughput and packet
 loss as the required result!

 what's on? does iperf calculate the throughput independent from
 packet-loss? and why is it reporting it named as bandwidth??

 thank you all..

 Kind regards,
 takcoder

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Throughput test with iperf...

2013-09-29 Thread takCoder
thanks for your reply.. :)

i think it's iperf.. i installed /usr/ports/benchmarks/iperf port.
where can i find iperf2? my machines are both FreeBsds but i can't find
iperf2 in my ports collection..

Best Regards,
t.a.k


On Sun, Sep 29, 2013 at 11:38 AM, Doug Hardie bc...@lafn.org wrote:

 On 28 September 2013, at 23:38, takCoder tak.offic...@gmail.com wrote:

  hi again..
 
  would any of you please at least explain it to me what may cause iperf
  server ending up with Segmentation fault (core dumped) message right at
  the beginning of setting second connection in my bi-directional
 throughput
  test, using -r flag??
 
  i used these commands on client and server on two freebsd machines which
  are connected straight with one cat5e cable:
 
  iperf -s -i 1
  iperf -c X.Y.Z.T -t 60 -r
 
  just getting more confused.. :(

 Are you using iperf or iperf2.  Iperf has a few problems.  Iperf2 is more
 stable.




___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Throughput test with iperf...

2013-09-29 Thread Doug Hardie
On 28 September 2013, at 23:38, takCoder tak.offic...@gmail.com wrote:

 hi again..
 
 would any of you please at least explain it to me what may cause iperf
 server ending up with Segmentation fault (core dumped) message right at
 the beginning of setting second connection in my bi-directional throughput
 test, using -r flag??
 
 i used these commands on client and server on two freebsd machines which
 are connected straight with one cat5e cable:
 
 iperf -s -i 1
 iperf -c X.Y.Z.T -t 60 -r
 
 just getting more confused.. :(

Are you using iperf or iperf2.  Iperf has a few problems.  Iperf2 is more 
stable.



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Throughput test with iperf...

2013-09-29 Thread Doug Hardie

On 29 September 2013, at 01:20, takCoder tak.offic...@gmail.com wrote:

 thanks for your reply.. :)
 
 i think it's iperf.. i installed /usr/ports/benchmarks/iperf port.
 where can i find iperf2? my machines are both FreeBsds but i can't find 
 iperf2 in my ports collection.. 

Bad memory - its iperf3.  There is no port at this time.  You find it at:

http://code.google.com/p/iperf/


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Throughput test with iperf...

2013-09-29 Thread takCoder
Thank you, Doug, I'll check it :)

Best Regards,
t.a.k


On Sun, Sep 29, 2013 at 12:41 PM, Doug Hardie bc...@lafn.org wrote:


 On 29 September 2013, at 01:20, takCoder tak.offic...@gmail.com wrote:

  thanks for your reply.. :)
 
  i think it's iperf.. i installed /usr/ports/benchmarks/iperf port.
  where can i find iperf2? my machines are both FreeBsds but i can't find
 iperf2 in my ports collection..

 Bad memory - its iperf3.  There is no port at this time.  You find it at:

 http://code.google.com/p/iperf/


 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to 
 freebsd-questions-unsubscr...@freebsd.org

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Throughput test with iperf..

2013-09-28 Thread Talayeh Asadi
hi everyone,

this might be a bit off-topic but i am really confused and in need of your
helps.. :(

i need to understand what exactly iperf does while testing network
throughput?

i'm trying to run a throughput+frame loss test on a router using iperf, and
i am really confused with the definitions given for throughput and
packet-loss and iperf output..

as i have seen through my searches, throughput is the maximum transfer rate
at which we have no packet loss, so i thought i have to rerun iperf for
different transfer rate(in udp test), so i reach maximun rate while having
no drops...

but i have seen test videos in which they ran iperf once, with maximum
bandwidth of the line, and just used the reported throughput and packet
loss as the required result!

what's on? does iperf calculate the throughput independent from
packet-loss? and why is it reporting it named as bandwidth??

thank you all..

Kind regards,
t.a.k
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Throughput test with iperf...

2013-09-28 Thread takCoder
hi everyone,

this might be a bit off-topic but i am really confused and in need of your
helps.. :(

i need to understand what exactly iperf does while testing network
throughput?

i'm trying to run a throughput+frame loss test on a router using iperf, and
i am really confused with the definitions given for throughput and
packet-loss and iperf output..

as i have seen through my searches, throughput is the maximum transfer rate
at which we have no packet loss, so i thought i have to rerun iperf for
different transfer rate(in udp test), so i reach maximun rate while having
no drops...

but i have seen test videos in which they ran iperf once, with maximum
bandwidth of the line, and just used the reported throughput and packet
loss as the required result!

what's on? does iperf calculate the throughput independent from
packet-loss? and why is it reporting it named as bandwidth??

thank you all..

Kind regards,
takcoder
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


which performance test tool to use?

2013-09-26 Thread takCoder
Hi everyone,

I need and am trying to find a way to run reliable performance tests on my
Network nodes.

I am looking for proper BSD-Based tools, which give me  information about
my systems' throughput, latency, packet-drop and alike in the performance
test family...

Would you please share your experiences with me?
It would be really kind of you t do so; Thank you all in advance.

Best Regards,
takCoder
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


test if script called by cron

2013-09-16 Thread Paul Macdonald


Hi,

Is there a simple way of testing whether a given script was called via cron,

I'd rather find a solution that would work from within the script rather 
than setting an environment variable in the crontab.


thanks
Paul.

(anyone here going to EuroBSD con?)

--
-
Paul Macdonald
IFDNRG Ltd
Web and video hosting
-
t: 0131 5548070
m: 07970339546
e: p...@ifdnrg.com
w: http://www.ifdnrg.com
-
IFDNRG
40 Maritime Street
Edinburgh
EH6 6SA

High Specification Dedicated Servers from £100.00pm


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: test if script called by cron

2013-09-16 Thread Polytropon
On Mon, 16 Sep 2013 12:26:59 +0100, Paul Macdonald wrote:
 Is there a simple way of testing whether a given script was called via cron,
 
 I'd rather find a solution that would work from within the script rather 
 than setting an environment variable in the crontab.

I'd suggest the script creates a file (lock file or,
much easier, just a simple normal file) at its beginning:

#!/bin/sh
/usr/bin/touch /tmp/scriptrun
# ... your script content here ...

You could also output the date command to that file
to see when the script has been called:

#!/bin/sh
/bin/date +%Y-%m-%d %H:%M:%S  /tmp/scriptrun
# ... your script content here ...

Of course you would have to manually remove that file
after you have verified its existence and content.



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: test if script called by cron

2013-09-16 Thread Dan Nelson
In the last episode (Sep 16), Paul Macdonald said:
 Is there a simple way of testing whether a given script was called via cron,
 
 I'd rather find a solution that would work from within the script rather 
 than setting an environment variable in the crontab.

You check to see if stdin is a terminal, but that's not conclusive.  One way
to know for sure is to look at the name of the process that launched you:

if [ ! -t 0 ] ; then
 echo no tty, possibly run from cron
fi

parent=$(ps -o command= -p $PPID)
case $parent in 
 *cron* ) echo parent is $parent, almost certainly cron ;;
esac

-- 
Dan Nelson
dnel...@allantgroup.com
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: test if script called by cron

2013-09-16 Thread Jerry
On Mon, 16 Sep 2013 12:26:59 +0100
Paul Macdonald articulated:

 
 Hi,
 
 Is there a simple way of testing whether a given script was called
 via cron,
 
 I'd rather find a solution that would work from within the script
 rather than setting an environment variable in the crontab.
 
 thanks
 Paul.
 
 (anyone here going to EuroBSD con?)

If you want to learn if the running script was called via cron, this
would work, assuming you are running Bash.

if [[ ! -t 0 ]]; then
echo Running from Cron
fi

-- 
Jerry ♔

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the Reply-To header.
__

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org

Re: test if script called by cron

2013-09-16 Thread Polytropon
On Mon, 16 Sep 2013 23:28:17 -0400, kpn...@pobox.com wrote:
 On Mon, Sep 16, 2013 at 02:05:04PM +0200, Polytropon wrote:
  On Mon, 16 Sep 2013 12:26:59 +0100, Paul Macdonald wrote:
   Is there a simple way of testing whether a given script was called via 
   cron,
   
   I'd rather find a solution that would work from within the script rather 
   than setting an environment variable in the crontab.
  
  I'd suggest the script creates a file (lock file or,
  much easier, just a simple normal file) at its beginning:
  
  #!/bin/sh
  /usr/bin/touch /tmp/scriptrun
  # ... your script content here ...
 
 Wouldn't the lockf command be better than touch? That way you get the
 condition code telling you whether or not the script is already running.

Yes, it would probably be better in this case. This, in
combination with the suggestion of test-t 0 to check
if the script has been interactively called or not, looks
like a better solution.

However, the intial question does not make fully sure (at
least to me as a non-native speaker) if the intention is
(a) to check _if_ the script has been run via cron, or
(b) to check if the script has been run via _cron_. :-)



  Of course you would have to manually remove that file
  after you have verified its existence and content.
 
 If you use lockf as a drop-in replacement for touch then, yes, you'll
 need to keep the lock file until removing it at the end of the script.

Depends. Let's say the script is scheduled at 3:00 and will
finish in about half an hour. The evidence file will only
be visible from 3:00 to ca. 3:30, so removing the evidence
file after the script has finished could lead to a false-negative
result (has not been run). This is also true for the more
simple solution using the touch command (no rm call at the
end of the script).



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Test

2013-06-01 Thread Al Plant


Ping . Pong

~Al Plant - Honolulu, Hawaii -  Phone:  808-284-2740
  + http://hawaiidakine.com + http://freebsdinfo.org +
  + http://aloha50.net   - Supporting - FreeBSD  7.2 - 8.0 - 9* +
   email: n...@hdk5.net 
All that's really worth doing is what we do for others.- Lewis Carrol

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Test

2013-06-01 Thread Chris Hill

On Sat, 1 Jun 2013, Al Plant wrote:


Ping . Pong


http://lists.freebsd.org/mailman/listinfo/freebsd-test

Mahalo.



~Al Plant - Honolulu, Hawaii -  Phone:  808-284-2740
 + http://hawaiidakine.com + http://freebsdinfo.org +
 + http://aloha50.net   - Supporting - FreeBSD  7.2 - 8.0 - 9* +
  email: n...@hdk5.net 
All that's really worth doing is what we do for others.- Lewis Carrol


--
Chris Hill   ch...@monochrome.org
** [ Busy Expunging / ]
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


FreeBSD 9.1 i386 and OpenBSD 5.2 i386 - Ping Test Intermittent

2013-01-21 Thread Zamri Besar
Good morning,

I installed FreeBSD (9.1 i386) and OpenBSD (5.2 i386), and I found ping
result from directly attached Cisco switch to FreeBSD boxes were
intermittent. I test to ping to few other FreeBSD boxes, and still produce
the same result like below, regardless either using em or bce, or changing
the connected interface at Cisco switch that used by OpenBSD box. This is
default installation of FreeBSD and OpenBSD.

By the way, do syslog server (under FreeBSD or OpenBSD has limitation to
receive more than 3000 messages per second?

From Cisco switch to FreeBSD box:

#ping 10.100.3.73 repeat 1000

Type escape sequence to abort.
Sending 1000, 100-byte ICMP Echos to 10.100.3.73, timeout is 2 seconds:
!!
!!
!!!.!!
!!
!!
!.
!!
!!
!!.!!!
!!
!!
.!
!!
!!
!!.!
Success rate is 99 percent (995/1000), round-trip min/avg/max = 1/1/8 ms

From Cisco switch to OpenBSD box:

#ping 10.100.3.165 repeat 1000
Type escape sequence to abort.
Sending 1000, 100-byte ICMP Echos to 10.100.3.165, timeout is 2 seconds:
!!
!!
!!
!!
!!
!!
!!
!!
!!
!!
!!
!!
!!
!!

Success rate is 100 percent (1000/1000), round-trip min/avg/max = 1/1/4 ms

Please advise.

-- 
Thank you.

Zamri Besar
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


IPv6 Ready Logo test to Freebsd9.0(host), nd.p2 169-175 failed.

2012-12-12 Thread haohao Gao
Dear Freebsder:
   I made a Ipv6 ready  logo test to Freebsd9.0,but nd.p2 169-175 items
were failed .
  These failed items are related to Redirection. I find the lack of
neighbor solicitation make these items fail .
   Maybe the existence of neighbor cache of the tester Freebsd cause
the lack of 'necessary' neighbor solicitation.
   I don't know how to make these failed items pass.
   I am looking forward to receive your reply.
   Thanks!

ps:
attachments are the image of tester Freebsd's /etc/rc.conf and some
related images about the test.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org

Test

2012-10-18 Thread Paul Wootton

Just a test message
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Test

2012-10-18 Thread Виталий Туровец
2012/10/18 Paul Wootton paul-free...@fletchermoorland.co.uk:
 Just a test message
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org

Your test seems to be succesful :)

-- 




~~~
WBR,
Vitaliy Turovets
NOC Lead @TV-Net ISP
NOC Lead @Service Outsourcing company
+38(093)265-70-55
VITU-RIPE
X-NCC-RegID: ua.tv
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Test

2012-10-18 Thread Jerry
On Thu, 18 Oct 2012 12:16:55 +0100
Paul Wootton articulated:

 Just a test message

Per URL:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/eresources.html#ERESOURCES-MAIL

Note: If you wish to test your ability to send to FreeBSD lists, send a test 
message to freebsd-test. Please do not send test messages to any other list.

-- 
Jerry ♔

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the Reply-To header.
__
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org

Re: CUPS 1.5.2 not working, like to test 1.4.x, how?

2012-02-21 Thread Christopher J. Ruwe
On Tue, 21 Feb 2012 00:23:19 +0100
Polytropon free...@edvax.de wrote:

 On Mon, 20 Feb 2012 23:46:52 +0100, Christopher J. Ruwe wrote:
  Is there any documentation available on how to retrieve old ports
  from the cvs-attic? I just don't know how, so that I could test my
  assumption that CUPS 1.4.x should be working for my setup.
 
 There's a port to do so: portdowngrade. You can use
 it to obtain older versions of a port. 
 
 (I've been using it successfully to downgrade xzgv
 to a working version.)
 


Thanks a lot. In my case, it meant finding out that you have to rebuild
INDEX, downgrading the cups-base and cups-client port to 1.4.8 and then
rebuidling the chain. Boiled down to 5m of actual work and some more
waiting for the compile ... I have now cups 1.4.8 and am functional with
a Kyocera 1030D connected via usb.

So, thank you again, hava a nice week, cheers
--
Christopher
TZ GMT +1h 

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


CUPS 1.5.2 not working, like to test 1.4.x, how?

2012-02-20 Thread Christopher J. Ruwe
I am trying to get CUPS 1.5.2 from ports working with my printer and I
encounter a problem exactly like a bug described in
http://www.cups.org/str.php?L4008, albeit with a Kyocera 1030-D instead of 
a kyocera 2000. In essence, CUPS 1.5.+ is sending corrupted data to some
printers and the remedies suggested by the CUPS-people do not work
... not in his case and neither in mine.

As I cannot get CUPS 1.5.2 to work, I would like to test my assumption
of a buggy 1.5.+ with an older version, preferably 1.4.8 which I have in
a working state with that printer on a Solaris machine.

Is there any documentation available on how to retrieve old ports from
the cvs-attic? I just don't know how, so that I could test my assumption
that CUPS 1.4.x should be working for my setup.

Thanks and cheers,
--
Christopher 
TZ GMT + 1h


signature.asc
Description: PGP signature


Re: CUPS 1.5.2 not working, like to test 1.4.x, how?

2012-02-20 Thread Polytropon
On Mon, 20 Feb 2012 23:46:52 +0100, Christopher J. Ruwe wrote:
 Is there any documentation available on how to retrieve old ports from
 the cvs-attic? I just don't know how, so that I could test my assumption
 that CUPS 1.4.x should be working for my setup.

There's a port to do so: portdowngrade. You can use
it to obtain older versions of a port. 

(I've been using it successfully to downgrade xzgv
to a working version.)




-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Abstraction leakage burning test DVD+R

2011-10-29 Thread freebsd-questions
Hello,

After my dump/restore test failed back in May of 2010[1], I finally got 
around to burning a test DVD after installing about 2.5 inches of 
semi-rigid foam under the machine to dampen any local vibration.

In designing the test, I was under the mistaken impression that buffer 
under-runs would reduce the amount of space for writing. Apparently, 
DVD+R media supports loss-less linking[2].


Test Procedure (using ATAPI interface, rather than the newer ATAPI/CAM 
interface). The man pages do not imply any major differences for this 
test. The drive in question is a LG drive with the SuperMulti logo.

Test procedure:
1.# mkfifo auxout aux45G

2. In other terminals:
# cat auxout | md5
# dd if=aux45G count=2197266 bs=2048 | md5

3. Write test disk:
# dd if=/dev/urandom bs=2048 count=2295104 | \
 tee auxout aux45G | dd of=/dev/acd0 bs=2048

Error:
dd:/dev/acd0: Input/output error
679+0 records in
678+0 records out
1388544 bytes transferred in 80.97 seconds 
(step 4 not completed due to premature burn failure after 684 
blocks, 80 seconds (from 'dd if=aux45G'...) (15743 bytes/sec))
Drive spun up at least twice during this time.

4. Read test (in another term 'cat aux45G | md5')
# dd if=/dev/acd0 bs=2048 count=2295104 | tee aux45G | md5

Questions:
Currently, the drive is locked. Before forcefully ejecting it and 
risking an new disk, I want to know what may have gone wrong. Was 
I expecting too much of FreeBSD on old hardware? 

The hardware is a Pentium-II desktop machine with 256MB of RAM, with a 
Promise ATA100 controller card. An extra-long 80-wire cable is in use 
(to ad4).
acd0: DVDR HL-DT-STDVD-RAM GSA-H55N/1.03 at ata-1-master UDMA33
ad4: 78167MB Maxtor 6Y080L0 YAR41WB0 at ata-2-master UDMA100

dd if=/dev/urandom of=/home/test
Wrote at 4485315 bytes/second: faster than I was expecting (based on 
linux's slow urandom function), but still slow enough to cause buffer 
under-runs. So the second question is: do I have to do anything special 
to enable buffer underrun protection? (with DVD+R's lossless linking 
feature, no data should be lost.)

How important is running ATAPI/CAM? Obviously DVD burning was happening 
before the release of version 8, as far as I know.

If running out of data is supposed to be abstracted away, did I find a 
bug that only shows up on old hardware or heavy load? (Or possibly drive 
firmware bug?)

Regards,

James Phillips

# uname -a
FreeBSD dusty.inet 8.0-RELEASE FreeBSD 8.0-RELEASE #0: Sat Nov 21 
15:48:17 UTC 2009  
r...@almeida.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386

[1] dump/restore (to DVD+R) test failure
http://docs.freebsd.org/cgi/getmsg.cgi?fetch=290415+0+archive/2010/freebsd-questions/20100530.freebsd-questions

[2] Why DVD+R(W) is superior to DVD-R(W)
http://www.myce.com/article/Why-DVDRW-is-superior-to-DVD-RW-203/

PS: is signing messages on the mailing list a faux-pas?

-- 
OpenPGP Public Key: http://phillipsjk.ca/signature0611.txt



signature.asc
Description: Digital signature


firefox 4 pkg_add -r and port error ``TEST-UNEXPECTED-FAIL | automation.py | Exited with code 1 during test run''

2011-05-09 Thread Antonio Olivares
Dear folks,

On my system that I have updated to 8.2-RELEASE-amd64 I get mistake if I try to
# pkg_add -r firefox

pkg_add:  package 'perl-5.10.1_3.tbz... Done.
pkg_add:  package 'perl-5.10.1_3.tbz conflicts with perl-5.12.3
pkg_add:  please use pkg_delete first to remove conflicting package(s)
or -f to force installation
pkg_add:  pkg_add of dependency 'perl-5.10.1_3' failed!

I then cd'd to /usr/ports/www/firefox and ran
# make install clean

and encountered a similar error to

INFO | automation.py | Application pid: 51999
Error: cannot open display: localhost:1001
TEST-UNEXPECTED-FAIL | automation.py | Exited with code 1 during test run
INFO | automation.py | Application ran for: 0:00:00.514949
INFO | automation.py | Reading PID log: /usr/tmp/tmpQW8cK8pidlog
gmake: *** [profiledbuild] Error 1
*** Error code 1

found in
http://groups.google.com/group/mailing.freebsd.ports-bugs/msg/46bb521fcb78abdf
and
http://freebsd.1045724.n5.nabble.com/ports-155949-firefox-4-WITH-PGO-better-Text-against-DISPLAY-problem-td4265504.html

I have run make config and disabled the option WITH_PGO I have
unchecked it and trying again to see if it is building.  If this
fails, I will ask for help or if it succeeds post a Solved message :)

Regards,

Antonio
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Emulators to test non-x86 FreeBSD ports?

2011-01-28 Thread C. P. Ghost
Hello list,

are there any emulators out there that can run the non-x86 versions of FreeBSD
on a FreeBSD/i386 or FreeBSD/amd64 host?

I'm especially interested in trying FreeBSD/sparc64 port, but I'd also like to
test the FreeBSD/powerpc and the FreeBSD/arm ports on an emulator, before
seeking real hardware.

Oh, and btw, what kind of affordable SPARC-based desktops with newish
SPARC processors (i.e. above UltraSparc IIIi) would you recommend for
testing? I've read this page:
  http://www.freebsd.org/platforms/sparc.html
but I'm at a loss as to what vendor, model etc. to get.

Thanks,
-cpghost.

-- 
Cordula's Web. http://www.cordula.ws/
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Emulators to test non-x86 FreeBSD ports?

2011-01-28 Thread Robert Bonomi
 From owner-freebsd-questi...@freebsd.org  Fri Jan 28 11:37:00 2011
 Date: Fri, 28 Jan 2011 18:27:35 +0100
 From: C. P. Ghost cpgh...@cordula.ws
 To: FreeBSD Mailing List freebsd-questions@freebsd.org
 Subject: Emulators to test non-x86 FreeBSD ports?

 Hello list,

 are there any emulators out there that can run the non-x86 versions of 
 FreeBSD on a FreeBSD/i386 or FreeBSD/amd64 host?

Such things, by definition, are a 'simulator', not an 'emulator'.  They
exist, they are *pricey* (think 5 figures, left of the decimal point)
and they are =SLOW= (very, VERY slow!) compared to the real hardware.

 I'm especially interested in trying FreeBSD/sparc64 port, but I'd also 
 like to test the FreeBSD/powerpc and the FreeBSD/arm ports on an 
 emulator, before seeking real hardware.

Pick up some low-end used hardware, it's _lots_ cheaper, and will give 
you a better feel for how it works.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Emulators to test non-x86 FreeBSD ports?

2011-01-28 Thread David Brodbeck
On Fri, Jan 28, 2011 at 9:27 AM, C. P. Ghost cpgh...@cordula.ws wrote:
 Hello list,

 are there any emulators out there that can run the non-x86 versions of FreeBSD
 on a FreeBSD/i386 or FreeBSD/amd64 host?

 I'm especially interested in trying FreeBSD/sparc64 port, but I'd also like to
 test the FreeBSD/powerpc and the FreeBSD/arm ports on an emulator, before
 seeking real hardware.

QEMU claims PowerPC and ARM emulation support, but I don't know if
it's good enough to run FreeBSD.  PearPC is another PowerPC emulator,
but it was mainly targeted at running MacOS and the project appears to
have been stagnant since 2005.

It depends a bit on what you're trying to determine.  If you're
looking to test stability or performance, the results you get from an
emulator are unlikely to have any real comparison to what you get on
real hardware.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Emulators to test non-x86 FreeBSD ports?

2011-01-28 Thread C. P. Ghost
On Fri, Jan 28, 2011 at 7:43 PM, Robert Bonomi bon...@mail.r-bonomi.com wrote:
 From owner-freebsd-questi...@freebsd.org  Fri Jan 28 11:37:00 2011
 Date: Fri, 28 Jan 2011 18:27:35 +0100
 From: C. P. Ghost cpgh...@cordula.ws
 To: FreeBSD Mailing List freebsd-questions@freebsd.org
 Subject: Emulators to test non-x86 FreeBSD ports?

 Hello list,

 are there any emulators out there that can run the non-x86 versions of
 FreeBSD on a FreeBSD/i386 or FreeBSD/amd64 host?

 Such things, by definition, are a 'simulator', not an 'emulator'.  They
 exist, they are *pricey* (think 5 figures, left of the decimal point)
 and they are =SLOW= (very, VERY slow!) compared to the real hardware.

Okay, let it be a simulator then. ;) I don't care that they're slow
(I know how emulators work under the hood). As I've used Bochs
on SPARC back then to run x86 OS, it was slow too, but that
didn't matter either.

The only multiplatform simulators I've seen right now belong
to the qemu family:

/usr/local/bin/qemu /usr/local/bin/qemu-system-mipsel
/usr/local/bin/qemu-img /usr/local/bin/qemu-system-ppc
/usr/local/bin/qemu-system-arm  /usr/local/bin/qemu-system-ppc64
/usr/local/bin/qemu-system-cris /usr/local/bin/qemu-system-ppcemb
/usr/local/bin/qemu-system-m68k /usr/local/bin/qemu-system-sh4
/usr/local/bin/qemu-system-microblaze   /usr/local/bin/qemu-system-sh4eb
/usr/local/bin/qemu-system-mips /usr/local/bin/qemu-system-sparc
/usr/local/bin/qemu-system-mips64   /usr/local/bin/qemu-system-sparc64
/usr/local/bin/qemu-system-mips64el /usr/local/bin/qemu-system-x86_64

But they don't emulate enough of a real system to run
the FreeBSD ports, AFAICT. That's why I'm asking for
other (more specialized?) emulators/simulators.

 I'm especially interested in trying FreeBSD/sparc64 port, but I'd also
 like to test the FreeBSD/powerpc and the FreeBSD/arm ports on an
 emulator, before seeking real hardware.

 Pick up some low-end used hardware, it's _lots_ cheaper, and will give
 you a better feel for how it works.

Yep, that's always an option.

-- 
Cordula's Web. http://www.cordula.ws/
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Emulators to test non-x86 FreeBSD ports?

2011-01-28 Thread C. P. Ghost
On Fri, Jan 28, 2011 at 7:56 PM, David Brodbeck g...@gull.us wrote:
 On Fri, Jan 28, 2011 at 9:27 AM, C. P. Ghost cpgh...@cordula.ws wrote:
 Hello list,

 are there any emulators out there that can run the non-x86 versions of 
 FreeBSD
 on a FreeBSD/i386 or FreeBSD/amd64 host?

 I'm especially interested in trying FreeBSD/sparc64 port, but I'd also like 
 to
 test the FreeBSD/powerpc and the FreeBSD/arm ports on an emulator, before
 seeking real hardware.

 QEMU claims PowerPC and ARM emulation support, but I don't know if
 it's good enough to run FreeBSD.  PearPC is another PowerPC emulator,
 but it was mainly targeted at running MacOS and the project appears to
 have been stagnant since 2005.

I'll check it out, thanks.

 It depends a bit on what you're trying to determine.  If you're
 looking to test stability or performance, the results you get from an
 emulator are unlikely to have any real comparison to what you get on
 real hardware.

Basically, I'm interested in assembly language programming on those
platforms. So if they ran in an emulator, that would be ideal, but I wouldn't
mind a couple of real hardware boxes if there's no software alternative.

BTW, have you guys any experience with emulators/gxemul? It doesn't
cover sparc but claims to implement a complete arm and powerpc
machine, at least for the corresponding netbsd ports.

Thanks,
-cpghost.

-- 
Cordula's Web. http://www.cordula.ws/
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: TV test image generator using mencoder

2011-01-24 Thread Da Rock

On 01/24/11 17:45, Polytropon wrote:

For an amateur TV (ham) project, I'm searching for a
convenient way to create a test image DVD or CD using
FreeBSD's port mencoder. But I can't get this working.
Maybe somebody on list has an idea of how to accomplish
this.

Input:  a still image (jpg, gif, png) of a test picture,
as shown on TV, already available

Output: a VCD-compatible MPEG video file which shows the
picture (which does not change) and plays a 1 kHz
testing sound (sine wave); the length of video
should be given in minutes

More:   a DVD-compatible output could be provided for
better quality if needed

The idea is this: With a set of, let's say 5 of such
MPEG files, each lasting 10 minutes, I want to burn a
VCD because that's what the player in use can play best.
If it plays the in repeat mode, every 10 minutes the
test image will change, the sound will stay the same.
The VCD can be done with mkvcdfs, I've already done
that for other purposes, works good. As this player
is a stand-alone device, there's no trouble getting
a TV (video or even antenna) signal out of a PC. :-)

Background: The test VCD can be played in continuous loop
while the transmitter is running. This way, receiving
tests can be done, as there is a good testing signal
for making statements about video and audio quality.
The combination of both, also using something standar-
dized (instead of a camera input, showing the town
from above or a look out of the window across the
street) is buch better for making QUALIFIED statements
about signal quality. Adjustments to the equipment
can be done more easily.

I've tried to do this with mencoder, but can't get any
usable results.

How would you suggest to get this done?



   

http://mplayerhq.hu

The docs cover all that, and mencoder can output in vcd or dvd format.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


TV test image generator using mencoder

2011-01-23 Thread Polytropon
For an amateur TV (ham) project, I'm searching for a
convenient way to create a test image DVD or CD using
FreeBSD's port mencoder. But I can't get this working.
Maybe somebody on list has an idea of how to accomplish
this.

Input:  a still image (jpg, gif, png) of a test picture,
as shown on TV, already available

Output: a VCD-compatible MPEG video file which shows the
picture (which does not change) and plays a 1 kHz
testing sound (sine wave); the length of video
should be given in minutes

More:   a DVD-compatible output could be provided for
better quality if needed

The idea is this: With a set of, let's say 5 of such
MPEG files, each lasting 10 minutes, I want to burn a
VCD because that's what the player in use can play best.
If it plays the in repeat mode, every 10 minutes the
test image will change, the sound will stay the same.
The VCD can be done with mkvcdfs, I've already done
that for other purposes, works good. As this player
is a stand-alone device, there's no trouble getting
a TV (video or even antenna) signal out of a PC. :-)

Background: The test VCD can be played in continuous loop
while the transmitter is running. This way, receiving
tests can be done, as there is a good testing signal
for making statements about video and audio quality.
The combination of both, also using something standar-
dized (instead of a camera input, showing the town
from above or a look out of the window across the
street) is buch better for making QUALIFIED statements
about signal quality. Adjustments to the equipment
can be done more easily.

I've tried to do this with mencoder, but can't get any
usable results.

How would you suggest to get this done?



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


test

2010-08-13 Thread PR


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: test

2010-08-13 Thread Svein Skogen (Listmail account)
On 14.08.2010 05:23, PR wrote:
 
 

epic fail. ;)

//Svein

-- 
+---+---
  /\   |Svein Skogen   | sv...@d80.iso100.no
  \ /   |Solberg Østli 9| PGP Key:  0xE5E76831
   X|2020 Skedsmokorset | sv...@jernhuset.no
  / \   |Norway | PGP Key:  0xCE96CE13
|   | sv...@stillbilde.net
 ascii  |   | PGP Key:  0x58CD33B6
 ribbon |System Admin   | svein-listm...@stillbilde.net
Campaign|stillbilde.net | PGP Key:  0x22D494A4
+---+---
|msn messenger: | Mobile Phone: +47 907 03 575
|sv...@jernhuset.no | RIPE handle:SS16503-RIPE
+---+---
 If you really are in a hurry, mail me at
   svein-mob...@stillbilde.net
 This mailbox goes directly to my cellphone and is checked
even when I'm not in front of my computer.

 Picture Gallery:
  https://gallery.stillbilde.net/v/svein/




signature.asc
Description: OpenPGP digital signature


Are kernel stress test results displayed online?

2010-07-21 Thread Yuri
Before one of the releases, I remember, kernel stress tests results were 
online.

Now I can't find them.

Are they run? (I guess they must be.)
Particularly would be interesting to see tests for FreeBSD 8.1-RC2, 
FreeBSD 8.0-STABLE and FreeBSD-9.0.

Also does stress test only cover kernel or device drivers as well?

Thanks,
Yuri
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Are kernel stress test results displayed online?

2010-07-21 Thread b. f.
Yuri wrote:
Before one of the releases, I remember, kernel stress tests results were
online.
Now I can't find them.

Are they run? (I guess they must be.)
Particularly would be interesting to see tests for FreeBSD 8.1-RC2,
FreeBSD 8.0-STABLE and FreeBSD-9.0.
Also does stress test only cover kernel or device drivers as well?

I don't know about the tests that are conducted as part of the release
engineering process, but there are links to some tests at:

http://people.freebsd.org/~pho/stress/index.html

I don't know how useful these will be -- as noted on the above page,
the intended audience is kernel developers, many of the tests are
associated with experimental kernel patches, the test results are
rarely exactly reproducible, and the tests only cover certain kernel
subsystems.  The test source code is available, so you could run your
own tests if you wanted.  You could also look at the tests in
/usr/src/tools/regression, or some of the benchmarks and tests in
Ports.

b.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Are kernel stress test results displayed online?

2010-07-21 Thread Yuri

On 07/21/2010 07:56, Peter Holm wrote:

There's not much to report, but if you have spare time you could run
the test your self. Different HW is always a good test parameter.
   


Does this mean that there were no failures at all for years?

The reason why I asked was because I started getting system freezes on 
8.1-PRERELEASE under heavy use. Before, 8.0-STABLE was very stable under 
the same load. So I remembered about kernel stress tests in case they 
might have higher failure rate after some recent 8.1 changes. But of 
course there are other factors like, possible NVidia driver updates or 
maybe memory getting bad, etc.


Yuri
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org



Re: Are kernel stress test results displayed online?

2010-07-21 Thread Peter Holm
On Wed, Jul 21, 2010 at 01:01:26AM -0700, Yuri wrote:
 Before one of the releases, I remember, kernel stress tests results were 
 online.
 Now I can't find them.
 

I do not update that list any more, because there is no need IMHO.

 Are they run? (I guess they must be.)

Oh, yes. All of the time.

 Particularly would be interesting to see tests for FreeBSD 8.1-RC2, 
 FreeBSD 8.0-STABLE and FreeBSD-9.0.

There's not much to report, but if you have spare time you could run
the test your self. Different HW is always a good test parameter.

 Also does stress test only cover kernel or device drivers as well?
 

The stress2 test primarily targets the kernel.

 Thanks,
 Yuri

-- 
Peter
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Are kernel stress test results displayed online?

2010-07-21 Thread Peter Holm
On Wed, Jul 21, 2010 at 08:02:21AM -0700, Yuri wrote:
 On 07/21/2010 07:56, Peter Holm wrote:
 There's not much to report, but if you have spare time you could run
 the test your self. Different HW is always a good test parameter.

 
 Does this mean that there were no failures at all for years?
 

No, of cause not. Take a look at
http://people.freebsd.org/~pho/stress/log/ls.html for problems
reported. Most if not all have been analyzed and fixed.

 The reason why I asked was because I started getting system freezes on 
 8.1-PRERELEASE under heavy use. Before, 8.0-STABLE was very stable under 
 the same load. So I remembered about kernel stress tests in case they 
 might have higher failure rate after some recent 8.1 changes. But of 
 course there are other factors like, possible NVidia driver updates or 
 maybe memory getting bad, etc.
 
 Yuri

I urge you to build a debug kernel and report the details of the
problem. If you have a specific test scenario I'd be happy to try and
reproduce it.

-- 
Peter
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Are kernel stress test results displayed online?

2010-07-21 Thread Yuri

On 07/21/2010 09:55, Peter Holm wrote:

I urge you to build a debug kernel and report the details of the
problem. If you have a specific test scenario I'd be happy to try and
reproduce it.
   


I just updated the kernel to RC2, if I get one more freeze I will 
rebuild and run it as debug.


BTW are there instructions how to build debug kernel (8.1) ?
Somehow googling building debug FreeBSD kernel doesn't fetch 
instructions for *debug* kernel, it only fetches instructions for just 
kernel which I do frequently. I know there should be WITNESS and 
DIAGNOSTIC options enabled, also coredumps should be enabled. But are 
there step by step instructions online?


Also when the system freezes will it dump core? Or how do I make it to 
dump core if there is no SEGV?


Yuri
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


dump/restore (to DVD+R) test failure

2010-05-24 Thread James Phillips
Hello,

It took reading the source code of a backup front-end to figure out that 
incremental backups are not the same thing as multiple incremental backups 
on the same medium; spilling over to the next disk if necessary.

As the handbook (section 18.12.1) says, dump has quirks due to its design 
dating back to 1975. Optical write-once media was punch tape or cards. Seeking 
to the middle of the media was time consuming, so daily tapes were simply 
written from the beginning, then rewound.

So, knowing this, I decided to test a full dump and restore to DVD+R media, 
following the example in the dump(8) man page. I suspect that the example was 
written with DVD-R in mind, but according to wikipedia,
http://en.wikipedia.org/wiki/DVD-R#Recordable_DVD_capacity_comparison
the smaller DVD+R media can handle the example in dump(8) with 184 2048 byte 
blocks to spare (implying the example intended 3576 spare sectors). The package 
for the DVD media just says 4.7 GB with only 2 significant digits.

I used the following command for the dump:
$/sbin/dump -0u -L -C16 -B4589840 -P 'growisofs -Z -dvd-compat 
/dev/cd0=/dev/fd/0' /home

Growisofs said 4700372992 bytes were written on the first disk (my notes don't 
record exactly which disk that was). That works out to 4590208kiB or 2295104 
sectors.
Edit: This matches the Wikipedia number; I assumed it to included zero padding

I tried the restore on a fresh freeBSD 8.0 install with no user accounts 
created (and atapicam not yet enabled):
dusty# cd /home
#restore -r -P 'dd if=/dev/acd0 of=/dev/fd/1 bs=2048 count=2294920'
warning: ./.snap: File exists
expected next file 706561, got 4
unknown tape header type -365754194
abort? [yn] n
resync restore, skipped 162 blocks
expected next file 847904, got 0
acd0: FAILURE - READ_BIG MEDIUM ERROR asc=0x10 ascq=0x00
dd: /dev/acd0: Input/output error
2294208+0 records in
2294208+0 records out
4698537984 bytes transferred in 2781.175375 secs (1689407 bytes/sec)
Mount tape volume 2
Enter ``none'' if there are no more tapes
otherwise enter tape name (default: dd if=/dev/acd0 of=/dev/fd/1 bs=2048 
count=2294920)
unknown tape header type -54549208
abort? [yn] n
resync restore, skipped 464 blocks
expected next file 5040133, got 0
1201264+0 records in
1201264+0 records out
2460188672 bytes transferred in 1330.121340 secs (1849597 bytes/sec)
dusty#

The unknown header type errors appear to be unrelated to the major read error 
reported at the end to the first disk. I suspect those may be corruption caused 
by a buffer underrun or local vibration.

Questions:
1. How do I determine which files (if any) are affected? is verbose mode 
required for that?
2. It appears the first disk lost 712 sectors of data (and a total of 896 
sectors of capacity) with that read error. Should I just burn the disks 
1024-4096 sectors short?
3. What is the best way to verify dumps at dump time?

I still have the data on another disk. I can restore it with dd if need be. I 
verified the newfs command appears to create a .snap directory by default now.

Regards,

James Phillips





___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


speed test in ports?

2010-01-11 Thread David Banning
I wonder if there is something in the ports that tests my DSL speed. 
I am guessing that if I installed firefox3 and then installed flash
or Java then I could go to speedtest.net, but I wonder if there is 
a simpler solution.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: speed test in ports?

2010-01-11 Thread Chuck Swiger
On Jan 11, 2010, at 9:45 AM, David Banning wrote:
 I wonder if there is something in the ports that tests my DSL speed. 
 I am guessing that if I installed firefox3 and then installed flash
 or Java then I could go to speedtest.net, but I wonder if there is 
 a simpler solution.

You can use ftp or fetch from the base system to test downloads of some 
reasonably large files, and get a decent estimate of your bandwidth (or that of 
the server, depending on which is lower).

However, the network-based tests from your ISP, speedtest.net, dslreports.com, 
etc including the tweak test often provide useful information about MTU, 
dropped packets, tweaking TCP window size, etc, so a browser-based test is a 
good approach.

Regards,
-- 
-Chuck

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: speed test in ports?

2010-01-11 Thread APseudoUtopia
On Mon, Jan 11, 2010 at 12:45 PM, David Banning
david+dated+1263663921.920...@skytracker.ca wrote:
 I wonder if there is something in the ports that tests my DSL speed.
 I am guessing that if I installed firefox3 and then installed flash
 or Java then I could go to speedtest.net, but I wonder if there is
 a simpler solution.
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


You don't need ports for thatJust use fetch(1) and grab an ISO of
a DVD (or even a CD) from somewhere. Eg, a debian DVD image or freebsd
image or whatever. A lot of ISPs boost the first x MB of a transfer to
give the illusion that you can download faster when doing speed tests
(since speed tests only transfer a small amount of data). Comcast's
PowerBoost is a perfect example of this. So if you get something
bigger, you can monitor the speed of the download and get your speed
test that way.

If you really want to be accurate, you can do the test several times
using mirrors in various geographical areas as well to get a better
overall idea of your available bandwidth.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: speed test in ports?

2010-01-11 Thread David Banning



You don't need ports for thatJust use fetch(1) and grab an ISO of
a DVD (or even a CD) from somewhere. Eg, a debian DVD image or freebsd
image or whatever. A lot of ISPs boost the first x MB of a transfer to
give the illusion that you can download faster when doing speed tests
(since speed tests only transfer a small amount of data). Comcast's
PowerBoost is a perfect example of this. So if you get something
bigger, you can monitor the speed of the download and get your speed
test that way.

If you really want to be accurate, you can do the test several times
using mirrors in various geographical areas as well to get a better
overall idea of your available bandwidth.
  
This method works for me - what about testing upload?  I am guessing the 
best way might be to login into another server and fetch from my server?

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


doxygen 1.6.2: portmaster reports error: qt.prf:170: Unknown test function: qtAddLibrary

2010-01-04 Thread O. Hartmann
After performing updates via portmaster on a regular basis on a FreeBSD 
8.0-STABLE/amd64  server, I got this following sticky error. I have no 
clue how to fix this. Any ideas?


Regards,
Oliver

---

g++  -o ../bin/doxytag ../objects/doxytag.o ../objects/logos.o 
../objects/version.o   -L/usr/local/lib -L../lib -lqtools -liconv
gmake[2]: Leaving directory 
`/usr/ports/devel/doxygen/work/doxygen-1.6.2/src'
gmake[1]: Leaving directory 
`/usr/ports/devel/doxygen/work/doxygen-1.6.2/src'

gmake -C addon/doxywizard
gmake[1]: Entering directory 
`/usr/ports/devel/doxygen/work/doxygen-1.6.2/addon/doxywizard'

qmake-qt4 doxywizard.pro -o Makefile.doxywizard
qt.prf:170: Unknown test function: qtAddLibrary
gmake -f Makefile.doxywizard
gmake[2]: Entering directory 
`/usr/ports/devel/doxygen/work/doxygen-1.6.2/addon/doxywizard'
c++ -c -pipe -O2 -pipe -march=nocona -fno-strict-aliasing -Wall -W 
-DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII -DQT_NO_DEBUG -DQT_XML_LIB 
-I/u r/local/share/qt/mkspecs/freebsd-g++ -I. -I/include -I. -Imoc 
-I/usr/local/include -o obj/doxywizard.o doxywizard.cpp

doxywizard.cpp:1:17: error: QtGui: No such file or directory
In file included from doxywizard.cpp:2:
doxywizard.h:4:23: error: QMainWindow: No such file or directory
doxywizard.h:5:21: error: QSettings: No such file or directory
doxywizard.h:6:23: error: QStringList: No such file or directory
In file included from doxywizard.cpp:4:
expert.h:4:21: error: QSplitter: No such file or directory
expert.h:5:23: error: QDomElement: No such file or directory
expert.h:6:17: error: QHash: No such file or directory
In file included from doxywizard.cpp:2:
doxywizard.h:19: error: expected class-name before '{' token
doxywizard.h:20: error: ISO C++ forbids declaration of 'Q_OBJECT' with 
no type

doxywizard.h:22: error: expected ';' before 'public'
doxywizard.h:24: error: expected ',' or '...' before '' token
doxywizard.h:24: error: ISO C++ forbids declaration of 'QString' with no 
type

doxywizard.h:27: error: 'QCloseEvent' has not been declared
doxywizard.h:28: error: 'QString' does not name a type
doxywizard.h:31: error: expected `:' before 'slots'
doxywizard.h:32: error: expected primary-expression before 'void'
doxywizard.h:32: error: ISO C++ forbids declaration of 'slots' with no type
doxywizard.h:32: error: expected ';' before 'void'
doxywizard.h:42: error: expected `:' before 'slots'
doxywizard.h:43: error: expected primary-expression before 'void'
doxywizard.h:43: error: ISO C++ forbids declaration of 'slots' with no type
doxywizard.h:43: error: expected ';' before 'void'
doxywizard.h:56: error: expected ',' or '...' before '' token
doxywizard.h:56: error: ISO C++ forbids declaration of 'QString' with no 
type

doxywizard.h:57: error: expected ',' or '...' before '' token
doxywizard.h:57: error: ISO C++ forbids declaration of 'QString' with no 
type

doxywizard.h:58: error: expected ',' or '...' before '' token
doxywizard.h:58: error: ISO C++ forbids declaration of 'QString' with no 
type

doxywizard.h:59: error: expected ',' or '...' before '' token
doxywizard.h:59: error: ISO C++ forbids declaration of 'QString' with no 
type

doxywizard.h:73: error: 'QString' does not name a type
doxywizard.h:74: error: 'QSettings' does not name a type
doxywizard.h:76: error: 'QStringList' does not name a type
In file included from doxywizard.cpp:4:
expert.h:18: error: expected class-name before '{' token
expert.h:19: error: ISO C++ forbids declaration of 'Q_OBJECT' with no type
expert.h:21: error: expected ';' before 'public'
expert.h:26: error: expected ',' or '...' before '' token
expert.h:26: error: ISO C++ forbids declaration of 'QString' with no type
expert.h:27: error: 'QTextStream' has not been declared
expert.h:28: error: 'QByteArray' does not name a type
expert.h:29: error: expected ',' or '...' before '' token
expert.h:29: error: ISO C++ forbids declaration of 'QByteArray' with no type
expert.h:30: error: ISO C++ forbids declaration of 'QHash' with no type
expert.h:30: error: expected ';' before '' token
expert.h:31: error: expected `;' before 'void'
expert.h:32: error: expected ',' or '...' before '' token
expert.h:32: error: ISO C++ forbids declaration of 'QString' with no type
expert.h:33: error: expected ',' or '...' before '' token
expert.h:33: error: ISO C++ forbids declaration of 'QString' with no type
expert.h:34: error: 'QString' does not name a type
expert.h:36: error: expected `:' before 'slots'
expert.h:37: error: expected primary-expression before 'void'
expert.h:37: error: ISO C++ forbids declaration of 'slots' with no type
expert.h:37: error: expected ';' before 'void'
expert.h:38: error: ISO C++ forbids declaration of 'QWidget' with no type
expert.h:38: error: expected ';' before '*' token
expert.h:40: error: expected `:' before 'slots'
expert.h:41: error: expected primary-expression before 'void'
expert.h:41: error: ISO C++ forbids declaration of 'slots' with no type
expert.h:41: error: expected ';' before 'void'
expert.h

Re: black hole test

2009-12-17 Thread Michael Powell
Jonathan McKeown wrote:

 On Wednesday 16 December 2009 22:05:06 Peter Wemm wrote:
 Daignostic message to trace mailing list processing, please ignore.
 
 You have heard of freebsd-test@ , haven't you?

Uhmm, he is the mail admin and this list was down; don't you think he should 
be able to test out the problem? 

Thanks Peter for fixing whatever it was...

-Mike



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


black hole test

2009-12-16 Thread Peter Wemm
Daignostic message to trace mailing list processing, please ignore.

-- 
Peter Wemm - pe...@wemm.org; pe...@freebsd.org; pe...@yahoo-inc.com; KI6FJV
All of this is for nothing if we don't go to the stars - JMS/B5
If Java had true garbage collection, most programs would delete
themselves upon execution. -- Robert Sewell
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


diagnostic test

2009-12-16 Thread Peter Wemm
Test

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: black hole test

2009-12-16 Thread Jonathan McKeown
On Wednesday 16 December 2009 22:05:06 Peter Wemm wrote:
 Daignostic message to trace mailing list processing, please ignore.

You have heard of freebsd-test@ , haven't you?
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


[Call to Test] [OT] aMSN-0.98.1

2009-12-01 Thread Sylvio Cesar
Hi folks,

I would like to invite everyone to test the newest version of aMSN.
This version has support for video conferencing and audio conferencing, is
using tk and tcl 8.6 with support for threads.

The tarball style ports can be downloaded at:
http://people.freebsd.org/ ~ sylvio/amsn-0.98.1.tar.gz

Some screens:

http://people.freebsd.org/~sylvio/amsn-0.98.1.png
http://people.freebsd.org/~sylvio/amsn_with_voice.png

Thank you all.

Regards,

Sylvio Cesar.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: [Call to Test] [OT] aMSN-0.98.1

2009-12-01 Thread Sylvio Cesar
Link is:

http://people.freebsd.org/~sylvio/amsn-0.98.1.tar.gz


2009/12/1 Sylvio Cesar scjamo...@bsd.com.br:
 Hi folks,

 I would like to invite everyone to test the newest version of aMSN.
 This version has support for video conferencing and audio conferencing, is
 using tk and tcl 8.6 with support for threads.

 The tarball style ports can be downloaded at:
 http://people.freebsd.org/ ~ sylvio/amsn-0.98.1.tar.gz

 Some screens:

 http://people.freebsd.org/~sylvio/amsn-0.98.1.png
 http://people.freebsd.org/~sylvio/amsn_with_voice.png

 Thank you all.

 Regards,

 Sylvio Cesar.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


test please ignore

2009-10-14 Thread henter2009

test please ignore
-- 
View this message in context: 
http://www.nabble.com/test-please-ignore-tp25889720p25889720.html
Sent from the freebsd-questions mailing list archive at Nabble.com.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: test please ignore

2009-10-14 Thread Chris Rees
2009/10/14 henter2009 jeronimocal...@googlemail.com:

 test please ignore
 --
 View this message in context: 
 http://www.nabble.com/test-please-ignore-tp25889720p25889720.html
 Sent from the freebsd-questions mailing list archive at Nabble.com.



This is not the list to test on.

http://lists.freebsd.org/mailman/listinfo/freebsd-test

Please use it.

Chris

-- 
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in a mailing list?
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Invitation to help test the BSD News Network...

2009-09-08 Thread Mikel King
Although I have received a very good response, I am still looking for  
a handful of beta testers as well as some volunteers to help tweak the  
installation.


If you are interested in helping build the BSD News Network then  
contact me directly off list.


Regards,
Mikel King
CEO, Olivent Technologies
Senior Editor, Daemon News
Columnist, BSD Magazine
6 Alpine Court,
Medford, NY 11763
o: 631.627.3055
skype:mikel.king
http://olivent.com
http://mikelking.com
http://twitter.com/mikelking

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Why /bin/sh doesn't like the line: if test x$my_var == xyes; then

2009-09-03 Thread Ruben de Groot
On Thu, Sep 03, 2009 at 06:59:38AM +0200, Polytropon typed:
 
  What
  is the version of /bin/sh currently used in 7.2? Where is it taken
  from? --version, -v, -version don't ever print version I guess due to
  FreeBSD policy of not versioning individual utilities.
 
 FreeBSD's Bourne shell does not have GNU long options such
 as --version. According to the shell's manpage, -v is used
 for verbosity, and -version isn't even defined. Refer to
 man sh for more options.
 
 The parts of the base system (as in opposite to Linux where no
 real the OS does exist) usually have the version of the
 release, but to be more precise, the individual version can be
 obtained from the source code. It can be found in /usr/src/bin/sh.
 For example, I have
 
   @(#)main.c  8.6 (Berkeley) 5/28/95
   $FreeBSD: src/bin/sh/main.c,v 1.29 2006/10/07 16:51:16 stefanf Exp $
 
 in the source file main.c, and the Makefile indicates
 
   @(#)Makefile8.4 (Berkeley) 5/5/95
   $FreeBSD: src/bin/sh/Makefile,v 1.46 2006/04/17 17:55:11 schweikh Exp $
 
 as its particular version number and date.

Also, versions of all individual source files are usually displayed by ident(1):

nih# ident /bin/sh
/bin/sh:
 $FreeBSD: src/lib/csu/i386-elf/crti.S,v 1.7.20.1 2009/04/15 03:14:26 
kensmith Exp $
 $FreeBSD: src/lib/csu/i386-elf/crtn.S,v 1.6.20.1 2009/04/15 03:14:26 
kensmith Exp $
 $FreeBSD: src/lib/csu/common/crtbrand.c,v 1.4.20.1.6.1 2009/04/15 03:14:26 
kensmith Exp $
 $FreeBSD: src/lib/csu/i386-elf/crt1.c,v 1.15.8.1 2009/04/15 03:14:26 
kensmith Exp $
 $FreeBSD: src/bin/sh/alias.c,v 1.20.8.1 2009/04/15 03:14:26 kensmith Exp $
 $FreeBSD: src/bin/sh/arith.y,v 1.21.2.1.4.1 2009/04/15 03:14:26 kensmith 
Exp $
 $FreeBSD: src/bin/sh/arith_lex.l,v 1.24.8.1 2009/04/15 03:14:26 kensmith 
Exp $
 $FreeBSD: src/bin/sh/cd.c,v 1.35.2.1.4.1 2009/04/15 03:14:26 kensmith Exp $
 $FreeBSD: src/bin/sh/bltin/echo.c,v 1.14.28.1 2009/04/15 03:14:26 kensmith 
Exp $
 $FreeBSD: src/bin/sh/error.c,v 1.26.8.1 2009/04/15 03:14:26 kensmith Exp $
 $FreeBSD: src/bin/sh/eval.c,v 1.54.2.1.4.1 2009/04/15 03:14:26 kensmith 
Exp $
 $FreeBSD: src/bin/sh/exec.c,v 1.31.8.1 2009/04/15 03:14:26 kensmith Exp $
 $FreeBSD: src/bin/sh/expand.c,v 1.51.2.2.4.1 2009/04/15 03:14:26 kensmith 
Exp $
 $FreeBSD: src/bin/sh/histedit.c,v 1.29.8.1 2009/04/15 03:14:26 kensmith 
Exp $
 $FreeBSD: src/bin/sh/input.c,v 1.23.8.1 2009/04/15 03:14:26 kensmith Exp $
 $FreeBSD: src/bin/sh/jobs.c,v 1.72.8.1 2009/04/15 03:14:26 kensmith Exp $
 $FreeBSD: src/bin/sh/mail.c,v 1.14.8.1 2009/04/15 03:14:26 kensmith Exp $
 $FreeBSD: src/bin/sh/main.c,v 1.29.8.1 2009/04/15 03:14:26 kensmith Exp $
 $FreeBSD: src/bin/sh/memalloc.c,v 1.27.8.1 2009/04/15 03:14:26 kensmith 
Exp $
 $FreeBSD: src/bin/sh/miscbltin.c,v 1.35.2.1.2.1 2009/04/15 03:14:26 
kensmith Exp $
 $FreeBSD: src/bin/sh/mystring.c,v 1.13.28.1 2009/04/15 03:14:26 kensmith 
Exp $
 $FreeBSD: src/bin/sh/options.c,v 1.25.2.2.4.1 2009/04/15 03:14:26 kensmith 
Exp $
 $FreeBSD: src/bin/sh/output.c,v 1.20.8.1 2009/04/15 03:14:26 kensmith Exp $
 $FreeBSD: src/bin/sh/parser.c,v 1.58.2.1.4.1 2009/04/15 03:14:26 kensmith 
Exp $
 $FreeBSD: src/bin/sh/redir.c,v 1.26.28.1 2009/04/15 03:14:26 kensmith Exp $
 $FreeBSD: src/bin/sh/show.c,v 1.23.8.1 2009/04/15 03:14:26 kensmith Exp $
 $FreeBSD: src/bin/test/test.c,v 1.53.20.1 2009/04/15 03:14:26 kensmith Exp 
$
 $FreeBSD: src/bin/sh/trap.c,v 1.32.8.1 2009/04/15 03:14:26 kensmith Exp $
 $FreeBSD: src/bin/sh/var.c,v 1.37.8.1 2009/04/15 03:14:26 kensmith Exp $

Ruben

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Why /bin/sh doesn't like the line: if test x$my_var == xyes; then

2009-09-03 Thread Bertram Scharpf
Hi,

Am Donnerstag, 03. Sep 2009, 04:14:56 + schrieb jerry M:
 configure file got this line and it causes the message: test:
 xyes: unexpected operator But removing spaces around == or
 replacing == with = makes it to work.
 
 On Linux though this line works fine.

As `man test' describes, the /bin/test executable does not
recognize a == operator.

Neither in `sh' nor in `bash' the `test' executable will be called
(unless written as /bin/test). In both cases it is a builtin
command. The Sh builtin works like the `test' executable; the Bash
builtin recognizes ==.

Bertram


-- 
Bertram Scharpf
Stuttgart, Deutschland/Germany
http://www.bertram-scharpf.de
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Why /bin/sh doesn't like the line: if test x$my_var == xyes; then

2009-09-02 Thread jerry M
configure file got this line and it causes the message: test: xyes: unexpected 
operator
But removing spaces around == or replacing == with = makes it to work.

On Linux though this line works fine.

Why spaces around == would cause failure?
What
is the version of /bin/sh currently used in 7.2? Where is it taken
from? --version, -v, -version don't ever print version I guess due to
FreeBSD policy of not versioning individual utilities.


  
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Why /bin/sh doesn't like the line: if test x$my_var == xyes; then

2009-09-02 Thread Polytropon
On Thu, 3 Sep 2009 04:14:56 + (GMT), jerry M jerrry94...@yahoo.com wrote:
 configure file got this line and it causes the message: test: xyes: 
 unexpected operator
 But removing spaces around == or replacing == with = makes it to work.

Maybe those files are not intended to run on FreeBSD's standard
Bourne shell?



 On Linux though this line works fine.

This may be due to the fact that on most Linusi, sh is bash.
On FreeBSD, sh is a different shell than bash; it's the
original Bourne shell.



 Why spaces around == would cause failure?

First of al, refer to man test for the string operators. The
form == isn't mentioned there.

 s1 = s2   True if the strings s1 and s2 are identical.

 s1 != s2  True if the strings s1 and s2 are not identical.

 s1  s2   True if string s1 comes before s2 based on the binary value
   of their characters.

 s1  s2   True if string s1 comes after s2 based on the binary value
   of their characters.

Furthermore, it's wise to enclose the variable names in curly
brackets when used in a compositum. Your statement

if test x$my_var == xyes; then

would correctly read as follows:

if test x${my_var} = xyes; then

You can of course use [ instead of test, so it would be

if [ x${my_var} = xyes ]; then



 What
 is the version of /bin/sh currently used in 7.2? Where is it taken
 from? --version, -v, -version don't ever print version I guess due to
 FreeBSD policy of not versioning individual utilities.

FreeBSD's Bourne shell does not have GNU long options such
as --version. According to the shell's manpage, -v is used
for verbosity, and -version isn't even defined. Refer to
man sh for more options.

The parts of the base system (as in opposite to Linux where no
real the OS does exist) usually have the version of the
release, but to be more precise, the individual version can be
obtained from the source code. It can be found in /usr/src/bin/sh.
For example, I have

@(#)main.c  8.6 (Berkeley) 5/28/95
$FreeBSD: src/bin/sh/main.c,v 1.29 2006/10/07 16:51:16 stefanf Exp $

in the source file main.c, and the Makefile indicates

@(#)Makefile8.4 (Berkeley) 5/5/95
$FreeBSD: src/bin/sh/Makefile,v 1.46 2006/04/17 17:55:11 schweikh Exp $

as its particular version number and date.

The manual man sh includes this statement:

 The sh utility is the standard command interpreter for the system.  The
 current version of sh is in the process of being changed to conform with
 the IEEE Std 1003.2 (``POSIX.2'') specification for the shell.  This ver-
 sion has many features which make it appear similar in some respects to
 the Korn shell, but it is not a Korn shell clone like pdksh.  Only fea-
 tures designated by POSIX, plus a few Berkeley extensions, are being
 incorporated into this shell.  This man page is not intended to be a
 tutorial nor a complete specification of the shell.

as well as

 This version of sh was rewritten in 1989 under the BSD license after the
 Bourne shell from ATT System V Release 4 UNIX.

It's important, especially for interoperability, to declare
#/bin/sh only and ONLY if the script is for Bourne shell. If
you're using bash specifics, use #!/usr/local/bin/bash instead.
Keep in mind that you'll have to install bash (pkg_add -r bash)
in this case. A tidy way of coding, such as using the curly
brackets, is an important thing, too, as you can see. :-)


-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Why /bin/sh doesn't like the line: if test x$my_var == xyes; then

2009-09-02 Thread Dan Nelson
In the last episode (Sep 03), jerry M said:
 configure file got this line and it causes the message: test: xyes:
 unexpected operator But removing spaces around == or replacing == with =
 makes it to work.
 
 On Linux though this line works fine.
 
 Why spaces around == would cause failure?  What is the version of /bin/sh
 currently used in 7.2?  Where is it taken from?  --version, -v, -version
 don't ever print version I guess due to FreeBSD policy of not versioning
 individual utilities.

== isn't a valid comparison operator for the test command.  See the FreeBSD
manpage, or the Posix docs:
http://www.opengroup.org/onlinepubs/9699919799/toc.htm.  You need to use =.

Certain Linux distributions use bash as /bin/sh, which shortcuts the test
command internally and allows bash extensions, even in bourne-shell mode. 
Debian and Ubuntu use dash instead of bash, and this script would fail on
them as well.

-- 
Dan Nelson
dnel...@allantgroup.com
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Test

2009-06-03 Thread Chris Rees
2009/6/3 Al Plant n...@hdk5.net:
 Test
 --


Now try using freebsd-test@ ;)

Chris



-- 
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in a mailing list?
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Test

2009-06-02 Thread Al Plant

Test
--

~Al Plant - Honolulu, Hawaii -  Phone:  808-284-2740
  + http://hawaiidakine.com + http://freebsdinfo.org +
  + http://aloha50.net   - Supporting - FreeBSD 6.* - 7.* - 8.* +
   email: n...@hdk5.net 
All that's really worth doing is what we do for others.- Lewis Carrol

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


print test page - false negative

2009-05-08 Thread Andrew Gould
Just an anecdote to any of you who may be having trouble configuring
printing:

I installed FreeBSD 7.2 Release with CUPS and gutenprint-cups.  The printer
in question is an Epson Stylus Photo R280, which is supported by
gutenprint.  After configuring CUPS, including permissions for /dev/ulpt0, I
could print; but the test page came out as garbage.  In a moment of
frustration, I tried to print the CUPS configuration window from the File
menu in firefox..it worked!  I then shutdown and left to see Star Trek
before anything could go wrong.  :-)

I'll try to print from other applications later.

Andrew
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Bridging-(How to test and verify that bridging is enabled)

2009-03-02 Thread Adam Vande More

Faizan ul haq Muhammad wrote:
Hi, 


I am not sure but as per some internet guide, I have configured the bridge on 
Freebsd(7) Machine with two LAN cards on it

 

I have compiled my KERNEL with (device if_bridge) 

 


and then added code to rc.conf

 
cloned_interfaces=bridge0

ifconfig_bridge0=addm sk0 addm sk1 up
ifconfig_sk0=up
ifconfig_sk1=up  I connected two linux PCs with these two interfaces (sk0 and 
sk1) and tried to ping between them but didnt get any success.configuration seems to be 
ok, but still no traffice is being passed. Can any one give any sugestion ?  Regards!

 
  

What does ifconfig show?
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Bridging-(How to test and verify that bridging is enabled)

2009-03-02 Thread Olivier Nicole
Hi,

 I connected two linux PCs with these two interfaces (sk0 and sk1)
 and tried to ping between them but didnt get any
 success.configuration seems to be ok, but still no traffice is being
 passed. Can any one give any sugestion ?

Stupid question, but if you connect the 2 Linux boxes directly
(without the FreeBSD bridge in between) can they ping eachother?

Are you using properly crossed cables?

On the FreeBSD box, you can tcpdump(8) and see the packets moving:
tcpdump -i sk0 and tcpdump -i sk1 and you will see the pick request
and ping echo packets.

Olivier
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


RE: Bridging-(How to test and verify that bridging is enabled)

2009-03-02 Thread Faizan ul haq Muhammad



 


 Date: Mon, 2 Mar 2009 15:28:10 +0700
 From: o...@cs.ait.ac.th
 To: faiz...@hotmail.com
 CC: fbsd.questi...@rachie.is-a-geek.net; freebsd-questions@freebsd.org; 
 fb...@a1poweruser.com
 Subject: Re: Bridging-(How to test and verify that bridging is enabled)
 
 Hi,
 
  I connected two linux PCs with these two interfaces (sk0 and sk1)
  and tried to ping between them but didnt get any
  success.configuration seems to be ok, but still no traffice is being
  passed. Can any one give any sugestion ?
 
 Stupid question

Yess it is

, but if you connect the 2 Linux boxes directly
 (without the FreeBSD bridge in between) can they ping eachother?

Yes they can
 
 Are you using properly crossed cables?

Isnt it enough check for the  that two linux can ping each other..
 
 On the FreeBSD box, you can tcpdump(8) and see the packets moving:
 tcpdump -i sk0 and tcpdump -i sk1 and you will see the pick request
 and ping echo packets.
 

it says arp: who has 192.168.0.4 tell 192.168.0.5
 Olivier


_
Hotmail® is up to 70% faster. Now good news travels really fast. 
http://windowslive.com/online/hotmail?ocid=TXT_TAGLM_WL_HM_70faster_032009___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Bridging-(How to test and verify that bridging is enabled)

2009-03-02 Thread Olivier Nicole
Hi,

  Are you using properly crossed cables?
 Isnt it enough check for the  that two linux can ping each other..
 
Yes and no. You must used crossed Ethernet cable between your FreeBSD
bridge and each of your Linux boxes.

As someone suggested, what is ifconfig saying on the FreeBSD box? You
should see that both sk0 and sk1 have a status: active. Else it means
you have a cable problem.

An example of ifconfig for a bridge (FreeBSD 4.xx):

fxp0: flags=89c3UP,BROADCAST,RUNNING,NOARP,PROMISC,SIMPLEX,MULTICAST mtu 1500
ether 00:07:e9:xx:xx:xx
media: Ethernet autoselect (100baseTX full-duplex)
status: active
fxp1: flags=89c3UP,BROADCAST,RUNNING,NOARP,PROMISC,SIMPLEX,MULTICAST mtu 1500
ether 00:07:e9:yy:yy:yy
media: Ethernet autoselect (100baseTX full-duplex)
status: active

Once you make sure that both interfaces on your FreeBSD box are up and
running, you can procced to the next step:

  On the FreeBSD box=2C you can tcpdump(8) and see the packets moving:
  tcpdump -i sk0 and tcpdump -i sk1 and you will see the pick request
  and ping echo packets.
 it says arp: who has 192.168.0.4 tell 192.168.0.5

You'd need to give more information about your connection; something
like:

Linux 192.168.0.4 --- sk0 FreeBSD sk1 --- Linux 192.168.0.5

And you should also specify if ou where tcpdump'ing on interface sk0
or sk1. Once your bridge is working, you will get the same thing for
tcpdump on both interfaces.

Olivier
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


RE: Bridging-(How to test and verify that bridging is enabled)

2009-03-02 Thread Faizan ul haq Muhammad




 


 Date: Mon, 2 Mar 2009 16:35:33 +0700
 From: o...@cs.ait.ac.th
 To: faiz...@hotmail.com
 CC: fbsd.questi...@rachie.is-a-geek.net; freebsd-questions@freebsd.org; 
 fb...@a1poweruser.com
 Subject: Re: Bridging-(How to test and verify that bridging is enabled)
 
 Hi,
 
   Are you using properly crossed cables?
  Isnt it enough check for the that two linux can ping each other..
 
 Yes and no. You must used crossed Ethernet cable between your FreeBSD
 bridge and each of your Linux boxes.
Frankly i am not sure about the cables type but they works PC to PC 
connectivity. 
 As someone suggested, what is ifconfig saying on the FreeBSD box? You
 should see that both sk0 and sk1 have a status: active. Else it means
 you have a cable problem.

sk0: flags=8943UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST metric 0 mtu 
1500

options=bRXCSUM, TXCSUM, VLAN_MTU
 ether 00:0a:5e:1a:69:25
 media: Ethernet autoselect (1000baseTX full-duplex, flag0, flag1, flag2)
 status: active

 

 

sk1: flags=8943UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST metric 0 mtu 
1500

options=bRXCSUM, TXCSUM, VLAN_MTU
 ether 00:0a:5e:1a:67:ee
 media: Ethernet autoselect (1000baseTX full-duplex, flag0, flag1, flag2)
 status: active

 

here is the ifconfig output for the bridge interface:

bridge0: flags=8943UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST metric 0 mtu 1500

options=bRXCSUM, TXCSUM, VLAN_MTU
 ether 0a:54:d7:7e:aa:66

inet 192.168.0.1 netmask 0xff00 broadcast 192.168.0.255

id 00:00:00:00:00:00 priortiy 32768 hellotime 2 fwddelay 15

maxage 20 holdcnt 6 proto rstp maxaddr 100 timeout 1200

root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0



 
 An example of ifconfig for a bridge (FreeBSD 4.xx):
 
 fxp0: flags=89c3UP,BROADCAST,RUNNING,NOARP,PROMISC,SIMPLEX,MULTICAST mtu 
 1500
 ether 00:07:e9:xx:xx:xx
 media: Ethernet autoselect (100baseTX full-duplex)
 status: active
 fxp1: flags=89c3UP,BROADCAST,RUNNING,NOARP,PROMISC,SIMPLEX,MULTICAST mtu 
 1500
 ether 00:07:e9:yy:yy:yy
 media: Ethernet autoselect (100baseTX full-duplex)
 status: active
 
 Once you make sure that both interfaces on your FreeBSD box are up and
 running, you can procced to the next step:
 
   On the FreeBSD box=2C you can tcpdump(8) and see the packets moving:
   tcpdump -i sk0 and tcpdump -i sk1 and you will see the pick request
   and ping echo packets.
  it says arp: who has 192.168.0.4 tell 192.168.0.5
 
 You'd need to give more information about your connection; something
 like:
 
 Linux 192.168.0.4 --- sk0 FreeBSD sk1 --- Linux 192.168.0.5
 
 And you should also specify if ou where tcpdump'ing on interface sk0
 or sk1. Once your bridge is working, you will get the same thing for
 tcpdump on both interfaces.
ok here is the detail:

 

 Linux 192.168.0.5 --- sk0 FreeBSD sk1 --- Linux 192.168.0.4

ping from 192.168.0.5 to 192.168.0.4

tcpdump (on freeBSD) tcpdump -i sk0  RESULT arp: who has 192.168.0.4 tell 
192.168.0.5


ping from 192.168.0.4 to 192.168.0.5

tcpdump (on freeBSD) tcpdump -i sk1  RESULT arp: who has 192.168.0.5 tell 
192.168.0.4

tcpdump -i bridge0 gives nothing...
 Olivier


_
Windows Live™ Groups: Create an online spot for your favorite groups to meet.
http://windowslive.com/online/groups?ocid=TXT_TAGLM_WL_groups_032009___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Bridging-(How to test and verify that bridging is enabled)

2009-03-02 Thread Adam Vande More

Faizan ul haq Muhammad wrote:



 



  

Date: Mon, 2 Mar 2009 16:35:33 +0700
From: o...@cs.ait.ac.th
To: faiz...@hotmail.com
CC: fbsd.questi...@rachie.is-a-geek.net; freebsd-questions@freebsd.org; 
fb...@a1poweruser.com
Subject: Re: Bridging-(How to test and verify that bridging is enabled)

Hi,



Are you using properly crossed cables?


Isnt it enough check for the that two linux can ping each other..
  

Yes and no. You must used crossed Ethernet cable between your FreeBSD
bridge and each of your Linux boxes.

Frankly i am not sure about the cables type but they works PC to PC connectivity. 
  

As someone suggested, what is ifconfig saying on the FreeBSD box? You
should see that both sk0 and sk1 have a status: active. Else it means
you have a cable problem.



sk0: flags=8943UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST metric 0 mtu 
1500

options=bRXCSUM, TXCSUM, VLAN_MTU
 ether 00:0a:5e:1a:69:25
 media: Ethernet autoselect (1000baseTX full-duplex, flag0, flag1, flag2)
 status: active

 

 


sk1: flags=8943UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST metric 0 mtu 
1500

options=bRXCSUM, TXCSUM, VLAN_MTU
 ether 00:0a:5e:1a:67:ee
 media: Ethernet autoselect (1000baseTX full-duplex, flag0, flag1, flag2)
 status: active

 


here is the ifconfig output for the bridge interface:

bridge0: flags=8943UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST metric 0 mtu 1500

options=bRXCSUM, TXCSUM, VLAN_MTU
 ether 0a:54:d7:7e:aa:66

inet 192.168.0.1 netmask 0xff00 broadcast 192.168.0.255

id 00:00:00:00:00:00 priortiy 32768 hellotime 2 fwddelay 15

maxage 20 holdcnt 6 proto rstp maxaddr 100 timeout 1200

root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0
  

I think ifconfig bridge0 should list member interfaces.  Did you add them?
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


RE: Bridging-(How to test and verify that bridging is enabled)

2009-03-02 Thread Faizan ul haq Muhammad





 Date: Mon, 2 Mar 2009 07:48:40 -0600
 From: amvandem...@gmail.com
 CC: freebsd-questions@freebsd.org
 Subject: Re: Bridging-(How to test and verify that bridging is enabled)
 
 Faizan ul haq Muhammad wrote:
 
 
   
 
 

  Date: Mon, 2 Mar 2009 16:35:33 +0700
  From: o...@cs.ait.ac.th
  To: faiz...@hotmail.com
  CC: fbsd.questi...@rachie.is-a-geek.net; freebsd-questions@freebsd.org; 
  fb...@a1poweruser.com
  Subject: Re: Bridging-(How to test and verify that bridging is enabled)
 
  Hi,
 
  
  Are you using properly crossed cables?
  
  Isnt it enough check for the that two linux can ping each other..

  Yes and no. You must used crossed Ethernet cable between your FreeBSD
  bridge and each of your Linux boxes.
  
  Frankly i am not sure about the cables type but they works PC to PC 
  connectivity. 

  As someone suggested, what is ifconfig saying on the FreeBSD box? You
  should see that both sk0 and sk1 have a status: active. Else it means
  you have a cable problem.
  
 
  sk0: flags=8943UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST metric 0 
  mtu 1500
 
  options=bRXCSUM, TXCSUM, VLAN_MTU
   ether 00:0a:5e:1a:69:25
   media: Ethernet autoselect (1000baseTX full-duplex, flag0, flag1, flag2)
   status: active
 
   
 
   
 
  sk1: flags=8943UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST metric 0 
  mtu 1500
 
  options=bRXCSUM, TXCSUM, VLAN_MTU
   ether 00:0a:5e:1a:67:ee
   media: Ethernet autoselect (1000baseTX full-duplex, flag0, flag1, flag2)
   status: active
 
   
 
  here is the ifconfig output for the bridge interface:
 
  bridge0: flags=8943UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST metric 0 mtu 
  1500
 
  options=bRXCSUM, TXCSUM, VLAN_MTU
   ether 0a:54:d7:7e:aa:66
 
  inet 192.168.0.1 netmask 0xff00 broadcast 192.168.0.255
 
  id 00:00:00:00:00:00 priortiy 32768 hellotime 2 fwddelay 15
 
  maxage 20 holdcnt 6 proto rstp maxaddr 100 timeout 1200
 
  root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0

 I think ifconfig bridge0 should list member interfaces.  Did you add them?

ifconfig bridge0 addm sk0 addm sk1 up
ifconfig sk0 up
ifconfig sk1 up

this configuration exists in rc.conf


 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org

_
Windows Live™: Life without walls.
http://windowslive.com/explore?ocid=TXT_TAGLM_WL_allup_1a_explore_032009___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Bridging-(How to test and verify that bridging is enabled)

2009-03-02 Thread Adam Vande More

Faizan ul haq Muhammad wrote:





 Date: Mon, 2 Mar 2009 07:48:40 -0600
 From: amvandem...@gmail.com
 CC: freebsd-questions@freebsd.org
 Subject: Re: Bridging-(How to test and verify that bridging is enabled)

 Faizan ul haq Muhammad wrote:
 
 
 
 
 
 
  Date: Mon, 2 Mar 2009 16:35:33 +0700
  From: o...@cs.ait.ac.th
  To: faiz...@hotmail.com
  CC: fbsd.questi...@rachie.is-a-geek.net; 
freebsd-questions@freebsd.org; fb...@a1poweruser.com
  Subject: Re: Bridging-(How to test and verify that bridging is 
enabled)

 
  Hi,
 
 
  Are you using properly crossed cables?
 
  Isnt it enough check for the that two linux can ping each other..
 
  Yes and no. You must used crossed Ethernet cable between your FreeBSD
  bridge and each of your Linux boxes.
 
  Frankly i am not sure about the cables type but they works PC to 
PC connectivity.

 
  As someone suggested, what is ifconfig saying on the FreeBSD box? You
  should see that both sk0 and sk1 have a status: active. Else it means
  you have a cable problem.
 
 
  sk0: flags=8943UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST 
metric 0 mtu 1500

 
  options=bRXCSUM, TXCSUM, VLAN_MTU
  ether 00:0a:5e:1a:69:25
  media: Ethernet autoselect (1000baseTX full-duplex, flag0, flag1, 
flag2)

  status: active
 
 
 
 
 
  sk1: flags=8943UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST 
metric 0 mtu 1500

 
  options=bRXCSUM, TXCSUM, VLAN_MTU
  ether 00:0a:5e:1a:67:ee
  media: Ethernet autoselect (1000baseTX full-duplex, flag0, flag1, 
flag2)

  status: active
 
 
 
  here is the ifconfig output for the bridge interface:
 
  bridge0: flags=8943UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST metric 
0 mtu 1500

 
  options=bRXCSUM, TXCSUM, VLAN_MTU
  ether 0a:54:d7:7e:aa:66
 
  inet 192.168.0.1 netmask 0xff00 broadcast 192.168.0.255
 
  id 00:00:00:00:00:00 priortiy 32768 hellotime 2 fwddelay 15
 
  maxage 20 holdcnt 6 proto rstp maxaddr 100 timeout 1200
 
  root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0
 
 I think ifconfig bridge0 should list member interfaces. Did you add 
them?


ifconfig bridge0 addm sk0 addm sk1 up
ifconfig sk0 up
ifconfig sk1 up

this configuration exists in rc.conf

  

if ifconfig doesn't print out something like this:

bridge0: flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST metric 0 mtu 
1500

   ether 4a:be:26:65:75:06
   id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15
   maxage 20 holdcnt 6 proto rstp maxaddr 100 timeout 1200
   root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0
   member: sk0 flags=143LEARNING,DISCOVER,AUTOEDGE,AUTOPTP
   ifmaxaddr 0 port 1 priority 128 path cost 200

   member: sk1 flags=143LEARNING,DISCOVER,AUTOEDGE,AUTOPTP
   ifmaxaddr 0 port 2 priority 128 path cost 20

Then you need to add the member interfaces.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


RE: Bridging-(How to test and verify that bridging is enabled)

2009-03-02 Thread Faizan ul haq Muhammad





 Date: Mon, 2 Mar 2009 08:05:09 -0600
 From: amvandem...@gmail.com
 CC: freebsd-questions@freebsd.org
 Subject: Re: Bridging-(How to test and verify that bridging is enabled)
 
 Faizan ul haq Muhammad wrote:
 
 
 
 
   Date: Mon, 2 Mar 2009 07:48:40 -0600
   From: amvandem...@gmail.com
   CC: freebsd-questions@freebsd.org
   Subject: Re: Bridging-(How to test and verify that bridging is enabled)
  
   Faizan ul haq Muhammad wrote:
   
   
   
   
   
   
Date: Mon, 2 Mar 2009 16:35:33 +0700
From: o...@cs.ait.ac.th
To: faiz...@hotmail.com
CC: fbsd.questi...@rachie.is-a-geek.net; 
  freebsd-questions@freebsd.org; fb...@a1poweruser.com
Subject: Re: Bridging-(How to test and verify that bridging is 
  enabled)
   
Hi,
   
   
Are you using properly crossed cables?
   
Isnt it enough check for the that two linux can ping each other..
   
Yes and no. You must used crossed Ethernet cable between your FreeBSD
bridge and each of your Linux boxes.
   
Frankly i am not sure about the cables type but they works PC to 
  PC connectivity.
   
As someone suggested, what is ifconfig saying on the FreeBSD box? You
should see that both sk0 and sk1 have a status: active. Else it means
you have a cable problem.
   
   
sk0: flags=8943UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST 
  metric 0 mtu 1500
   
options=bRXCSUM, TXCSUM, VLAN_MTU
ether 00:0a:5e:1a:69:25
media: Ethernet autoselect (1000baseTX full-duplex, flag0, flag1, 
  flag2)
status: active
   
   
   
   
   
sk1: flags=8943UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST 
  metric 0 mtu 1500
   
options=bRXCSUM, TXCSUM, VLAN_MTU
ether 00:0a:5e:1a:67:ee
media: Ethernet autoselect (1000baseTX full-duplex, flag0, flag1, 
  flag2)
status: active
   
   
   
here is the ifconfig output for the bridge interface:
   
bridge0: flags=8943UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST metric 
  0 mtu 1500
   
options=bRXCSUM, TXCSUM, VLAN_MTU
ether 0a:54:d7:7e:aa:66
   
inet 192.168.0.1 netmask 0xff00 broadcast 192.168.0.255
   
id 00:00:00:00:00:00 priortiy 32768 hellotime 2 fwddelay 15
   
maxage 20 holdcnt 6 proto rstp maxaddr 100 timeout 1200
   
root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0
   
   I think ifconfig bridge0 should list member interfaces. Did you add 
  them?
 
  ifconfig bridge0 addm sk0 addm sk1 up
  ifconfig sk0 up
  ifconfig sk1 up
 
  this configuration exists in rc.conf
 

 if ifconfig doesn't print out something like this:
 
 bridge0: flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST metric 0 mtu 
 1500
 ether 4a:be:26:65:75:06
 id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15
 maxage 20 holdcnt 6 proto rstp maxaddr 100 timeout 1200
 root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0
 member: sk0 flags=143LEARNING,DISCOVER,AUTOEDGE,AUTOPTP
 ifmaxaddr 0 port 1 priority 128 path cost 200
 member: sk1 flags=143LEARNING,DISCOVER,AUTOEDGE,AUTOPTP
 ifmaxaddr 0 port 2 priority 128 path cost 20
 
 Then you need to add the member interfaces.

i noted that, following information is missing
 member: sk0 flags=143LEARNING,DISCOVER,AUTOEDGE,AUTOPTP
 ifmaxaddr 0 port 1 priority 128 path cost 200
 member: sk1 flags=143LEARNING,DISCOVER,AUTOEDGE,AUTOPTP
 ifmaxaddr 0 port 2 priority 128 path cost 20

Now i need to know how to add the interfaces..?
Any command do u knw and can help me..?

Regards!!!


 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org

_
Windows Live™: Life without walls.
http://windowslive.com/explore?ocid=TXT_TAGLM_WL_allup_1a_explore_032009___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Bridging-(How to test and verify that bridging is enabled)

2009-03-02 Thread Adam Vande More

Faizan ul haq Muhammad wrote:





 Date: Mon, 2 Mar 2009 08:05:09 -0600
 From: amvandem...@gmail.com
 CC: freebsd-questions@freebsd.org
 Subject: Re: Bridging-(How to test and verify that bridging is enabled)

 Faizan ul haq Muhammad wrote:
 
 
 
 
   Date: Mon, 2 Mar 2009 07:48:40 -0600
   From: amvandem...@gmail.com
   CC: freebsd-questions@freebsd.org
   Subject: Re: Bridging-(How to test and verify that bridging is 
enabled)

  
   Faizan ul haq Muhammad wrote:
   
   
   
   
   
   
Date: Mon, 2 Mar 2009 16:35:33 +0700
From: o...@cs.ait.ac.th
To: faiz...@hotmail.com
CC: fbsd.questi...@rachie.is-a-geek.net;
  freebsd-questions@freebsd.org; fb...@a1poweruser.com
Subject: Re: Bridging-(How to test and verify that bridging is
  enabled)
   
Hi,
   
   
Are you using properly crossed cables?
   
Isnt it enough check for the that two linux can ping each 
other..

   
Yes and no. You must used crossed Ethernet cable between your 
FreeBSD

bridge and each of your Linux boxes.
   
Frankly i am not sure about the cables type but they works PC to
  PC connectivity.
   
As someone suggested, what is ifconfig saying on the FreeBSD 
box? You
should see that both sk0 and sk1 have a status: active. Else 
it means

you have a cable problem.
   
   
sk0: flags=8943UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST
  metric 0 mtu 1500
   
options=bRXCSUM, TXCSUM, VLAN_MTU
ether 00:0a:5e:1a:69:25
media: Ethernet autoselect (1000baseTX full-duplex, flag0, 
flag1,

  flag2)
status: active
   
   
   
   
   
sk1: flags=8943UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST
  metric 0 mtu 1500
   
options=bRXCSUM, TXCSUM, VLAN_MTU
ether 00:0a:5e:1a:67:ee
media: Ethernet autoselect (1000baseTX full-duplex, flag0, 
flag1,

  flag2)
status: active
   
   
   
here is the ifconfig output for the bridge interface:
   
bridge0: flags=8943UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST 
metric

  0 mtu 1500
   
options=bRXCSUM, TXCSUM, VLAN_MTU
ether 0a:54:d7:7e:aa:66
   
inet 192.168.0.1 netmask 0xff00 broadcast 192.168.0.255
   
id 00:00:00:00:00:00 priortiy 32768 hellotime 2 fwddelay 15
   
maxage 20 holdcnt 6 proto rstp maxaddr 100 timeout 1200
   
root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0
   
   I think ifconfig bridge0 should list member interfaces. Did you add
  them?
 
  ifconfig bridge0 addm sk0 addm sk1 up
  ifconfig sk0 up
  ifconfig sk1 up
 
  this configuration exists in rc.conf
 
 
 if ifconfig doesn't print out something like this:

 bridge0: flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST metric 0 
mtu

 1500
 ether 4a:be:26:65:75:06
 id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15
 maxage 20 holdcnt 6 proto rstp maxaddr 100 timeout 1200
 root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0
 member: sk0 flags=143LEARNING,DISCOVER,AUTOEDGE,AUTOPTP
 ifmaxaddr 0 port 1 priority 128 path cost 200
 member: sk1 flags=143LEARNING,DISCOVER,AUTOEDGE,AUTOPTP
 ifmaxaddr 0 port 2 priority 128 path cost 20

 Then you need to add the member interfaces.

i noted that, following information is missing
 member: sk0 flags=143LEARNING,DISCOVER,AUTOEDGE,AUTOPTP
 ifmaxaddr 0 port 1 priority 128 path cost 200
 member: sk1 flags=143LEARNING,DISCOVER,AUTOEDGE,AUTOPTP
 ifmaxaddr 0 port 2 priority 128 path cost 20

Now i need to know how to add the interfaces..?
Any command do u knw and can help me..?

Regards!!!

http://windowslive.com/explore?ocid=TXT_TAGLM_WL_allup_1a_explore_032009

ifconfig bridge0 addm sk0 addm sk1 up
ifconfig sk0 up
ifconfig sk1 up

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


RE: Bridging-(How to test and verify that bridging is enabled)

2009-03-02 Thread Faizan ul haq Muhammad







 Date: Mon, 2 Mar 2009 08:28:01 -0600
 From: amvandem...@gmail.com
 CC: freebsd-questions@freebsd.org
 Subject: Re: Bridging-(How to test and verify that bridging is enabled)
 
 Faizan ul haq Muhammad wrote:
 
 
 
 
   Date: Mon, 2 Mar 2009 08:05:09 -0600
   From: amvandem...@gmail.com
   CC: freebsd-questions@freebsd.org
   Subject: Re: Bridging-(How to test and verify that bridging is enabled)
  
   Faizan ul haq Muhammad wrote:
   
   
   
   
 Date: Mon, 2 Mar 2009 07:48:40 -0600
 From: amvandem...@gmail.com
 CC: freebsd-questions@freebsd.org
 Subject: Re: Bridging-(How to test and verify that bridging is 
  enabled)

 Faizan ul haq Muhammad wrote:
 
 
 
 
 
 
  Date: Mon, 2 Mar 2009 16:35:33 +0700
  From: o...@cs.ait.ac.th
  To: faiz...@hotmail.com
  CC: fbsd.questi...@rachie.is-a-geek.net;
freebsd-questions@freebsd.org; fb...@a1poweruser.com
  Subject: Re: Bridging-(How to test and verify that bridging is
enabled)
 
  Hi,
 
 
  Are you using properly crossed cables?
 
  Isnt it enough check for the that two linux can ping each 
  other..
 
  Yes and no. You must used crossed Ethernet cable between your 
  FreeBSD
  bridge and each of your Linux boxes.
 
  Frankly i am not sure about the cables type but they works PC to
PC connectivity.
 
  As someone suggested, what is ifconfig saying on the FreeBSD 
  box? You
  should see that both sk0 and sk1 have a status: active. Else 
  it means
  you have a cable problem.
 
 
  sk0: flags=8943UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST
metric 0 mtu 1500
 
  options=bRXCSUM, TXCSUM, VLAN_MTU
  ether 00:0a:5e:1a:69:25
  media: Ethernet autoselect (1000baseTX full-duplex, flag0, 
  flag1,
flag2)
  status: active
 
 
 
 
 
  sk1: flags=8943UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST
metric 0 mtu 1500
 
  options=bRXCSUM, TXCSUM, VLAN_MTU
  ether 00:0a:5e:1a:67:ee
  media: Ethernet autoselect (1000baseTX full-duplex, flag0, 
  flag1,
flag2)
  status: active
 
 
 
  here is the ifconfig output for the bridge interface:
 
  bridge0: flags=8943UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST 
  metric
0 mtu 1500
 
  options=bRXCSUM, TXCSUM, VLAN_MTU
  ether 0a:54:d7:7e:aa:66
 
  inet 192.168.0.1 netmask 0xff00 broadcast 192.168.0.255
 
  id 00:00:00:00:00:00 priortiy 32768 hellotime 2 fwddelay 15
 
  maxage 20 holdcnt 6 proto rstp maxaddr 100 timeout 1200
 
  root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0
 
 I think ifconfig bridge0 should list member interfaces. Did you add
them?
   
ifconfig bridge0 addm sk0 addm sk1 up
ifconfig sk0 up
ifconfig sk1 up
   
this configuration exists in rc.conf
   
   
   if ifconfig doesn't print out something like this:
  
   bridge0: flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST metric 0 
  mtu
   1500
   ether 4a:be:26:65:75:06
   id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15
   maxage 20 holdcnt 6 proto rstp maxaddr 100 timeout 1200
   root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0
   member: sk0 flags=143LEARNING,DISCOVER,AUTOEDGE,AUTOPTP
   ifmaxaddr 0 port 1 priority 128 path cost 200
   member: sk1 flags=143LEARNING,DISCOVER,AUTOEDGE,AUTOPTP
   ifmaxaddr 0 port 2 priority 128 path cost 20
  
   Then you need to add the member interfaces.
 
  i noted that, following information is missing
   member: sk0 flags=143LEARNING,DISCOVER,AUTOEDGE,AUTOPTP
   ifmaxaddr 0 port 1 priority 128 path cost 200
   member: sk1 flags=143LEARNING,DISCOVER,AUTOEDGE,AUTOPTP
   ifmaxaddr 0 port 2 priority 128 path cost 20
 
  Now i need to know how to add the interfaces..?
  Any command do u knw and can help me..?
 
  Regards!!!
 
  http://windowslive.com/explore?ocid=TXT_TAGLM_WL_allup_1a_explore_032009
 ifconfig bridge0 addm sk0 addm sk1 up
 ifconfig sk0 up
 ifconfig sk1 up

Thanks a lot dear..
it worked. but i m still confused that i have the alternative configuration in 
rc.conf as per guideline here on this page:
http://www.freebsd.org/doc/en/books/handbook/network-bridging.html
it should have worked, but it did not. and here with these commands, it is 
working.. I am able to get reply to ping

Thanks a lot
/Faizan
 
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org

_
Windows Live™ Contacts: Organize your contact list. 
http://windowslive.com/connect/post/marcusatmicrosoft.spaces.live.com-Blog-cns!503D1D86EBB2B53C!2285.entry?ocid=TXT_TAGLM_WL_UGC_Contacts_032009___
freebsd

Re: Bridging-(How to test and verify that bridging is enabled)

2009-03-02 Thread Adam Vande More

Faizan ul haq Muhammad wrote:


 
  i noted that, following information is missing
  member: sk0 flags=143LEARNING,DISCOVER,AUTOEDGE,AUTOPTP
  ifmaxaddr 0 port 1 priority 128 path cost 200
  member: sk1 flags=143LEARNING,DISCOVER,AUTOEDGE,AUTOPTP
  ifmaxaddr 0 port 2 priority 128 path cost 20
 
  Now i need to know how to add the interfaces..?
  Any command do u knw and can help me..?
 
  Regards!!!
 
  
http://windowslive.com/explore?ocid=TXT_TAGLM_WL_allup_1a_explore_032009

 ifconfig bridge0 addm sk0 addm sk1 up
 ifconfig sk0 up
 ifconfig sk1 up

Thanks a lot dear..
it worked. but i m still confused that i have the alternative 
configuration in rc.conf as per guideline here on this page:

http://www.freebsd.org/doc/en/books/handbook/network-bridging.html
it should have worked, but it did not. and here with these commands, 
it is working.. I am able to get reply to ping



Make sure you got the full config in there adjusted to your settings:

cloned_interfaces=bridge0
ifconfig_bridge0=addm fxp0 addm fxp1 up
ifconfig_fxp0=up
ifconfig_fxp1=up

And that you've rebooted.  Assuming you've done those steps correctly, 
it should work.  Generally issue's like that are rooted in typo's and 
misconfigurations.  As your typo count gets incremented,  you will learn 
humility.  ;)  Least that's how it was for me.  Another good rule of 
thumb is if you're following the handbook and it's still doesn't work 
then you're not following the handbook.


Glad it works for you.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Bridging-(How to test and verify that bridging is enabled)

2009-03-01 Thread Faizan ul haq Muhammad

Hi, 

I am not sure but as per some internet guide, I have configured the bridge on 
Freebsd(7) Machine with two LAN cards on it

 

I have compiled my KERNEL with (device if_bridge) 

 

and then added code to rc.conf

 
cloned_interfaces=bridge0
ifconfig_bridge0=addm sk0 addm sk1 up
ifconfig_sk0=up
ifconfig_sk1=up  I connected two linux PCs with these two interfaces (sk0 and 
sk1) and tried to ping between them but didnt get any success.configuration 
seems to be ok, but still no traffice is being passed. Can any one give any 
sugestion ?  Regards!

 

 

_
Windows Live™: Life without walls.
http://windowslive.com/explore?ocid=TXT_TAGLM_WL_allup_1a_explore_032009___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Please, recommend CPU and RAM burn test

2009-02-24 Thread Artem Kuchin

Hello!

I need to really heavily test a box with 8 cores and 16GB FBDIM RAM.

Is there a suitable port for such task?

I'd like to point out that i don't want to measure perfomance. I need to 
really really

heavily load the server up to it's maximum.

--
Artem

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Please, recommend CPU and RAM burn test

2009-02-24 Thread Vasadi I. Claudiu Florin




Hello!

I need to really heavily test a box with 8 cores and 16GB FBDIM RAM.

Is there a suitable port for such task?

I'd like to point out that i don't want to measure perfomance. I need to  
really really

heavily load the server up to it's maximum.



well, not quite a port but there is a CD called Ultimate Boot CD with an  
app called pc-check if I remember correctly that really streses your RAM,  
CPU, MOBO, CD/DVD unit, etc.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Please, recommend CPU and RAM burn test

2009-02-24 Thread Manolis Kiagias

Vasadi I. Claudiu Florin wrote:




Hello!

I need to really heavily test a box with 8 cores and 16GB FBDIM RAM.

Is there a suitable port for such task?

I'd like to point out that i don't want to measure perfomance. I need 
to really really

heavily load the server up to it's maximum.



well, not quite a port but there is a CD called Ultimate Boot CD with 
an app called pc-check if I remember correctly that really streses 
your RAM, CPU, MOBO, CD/DVD unit, etc.


You could also try sysutils/cpuburn and math/mprime (in torture mode)
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Please, recommend CPU and RAM burn test

2009-02-24 Thread Wojciech Puchar


I need to really heavily test a box with 8 cores and 16GB FBDIM RAM.

make -j
generic kernel

but it won't full load CPUs and RAM

copy GENERIC to 10 other files, do config, and then
make depend;make -j in every directory.

if any kernel won't build - machine is not OK.

while doing this you may do

dd if=/dev/yourdisk of=/dev/null bs=1m
in parallel from each of your disk to check if disk subsystem works fine 
under load




Is there a suitable port for such task?

I'd like to point out that i don't want to measure perfomance. I need to 
really really

heavily load the server up to it's maximum.

--
Artem

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Please, recommend CPU and RAM burn test

2009-02-24 Thread Mel
On Tuesday 24 February 2009 07:12:06 Artem Kuchin wrote:
 Hello!

 I need to really heavily test a box with 8 cores and 16GB FBDIM RAM.

 Is there a suitable port for such task?

 I'd like to point out that i don't want to measure perfomance. I need to
 really really
 heavily load the server up to it's maximum.

sysutils/stress, in your case:
stress --vm 32 --vm-bytes 512M --cpu 8

will put it into swap, while cpu's are overloaded. Add --hdd 4 to write 4 1GB 
files in parallel, should be a nice test ;)

Test can be run till interrupt or use -t 300 to timeout after 5 minutes.

-- 
Mel

Problem with today's modular software: they start with the modules
and never get to the software part.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Please, recommend CPU and RAM burn test

2009-02-24 Thread Ross Cameron
On Tue, Feb 24, 2009 at 6:42 PM, Wojciech Puchar 
woj...@wojtek.tensor.gdynia.pl wrote:


 I need to really heavily test a box with 8 cores and 16GB FBDIM RAM.

 make -j
 generic kernel



why not  make -j 4x # of CPUs ???

that should over saturate the CPU and memory
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Problem with BASH and [ ! -t 0 ] test.

2009-02-22 Thread Karl Vogel
 In a previous message, ges...@yahoo.com wrote:

G I am using this snippet of code in a bash script that is run via CRON.
G 
G   # See if we are running via CRON
G   if [ ! -t 0 ] ...
G 
G It runs fine from the console; however, when run via CRON, it outputs Tput:
G No terminal type specified and no TERM environmental variable.

   On FreeBSD, I set an environment variable in the crontab file so I
   can check if something's being run via cron.  This has the advantage
   of not depending on any scripting language.  A sample crontab's below
   the signature.

   You can also set TERM to something harmless (say, vt100) but if
   something else is really expecting interactive behavior, that might
   come back to haunt you.  The safest bet is to find out what's expecting
   TERM to be set and either wrap it...

 case $CRON in
 ) interactive code here ;;
yes) ;;
 esac

   ...or get rid of it.

-- 
Karl Vogel  I don't speak for the USAF or my company
Man who live in glass house, dress in basement. --Bryan Albright

---
# Everything on a line is separated by blanks or tabs.
#
#+--- Minute (0-59)
#|   +--- Hour   (0-23)
#|   | +- Day(1-31)
#|   | |   +- Month  (1-12)
#|   | |   |   +- Day of week (0-6, 0=Sunday)
#|   | |   |   |+ Command to be run
#|   | |   |   ||
#v   v v   v   vv
#
# Shell variables
CRON=yes
#
# Keep an eye on disk space.
4* *   *   */usr/local/cron/checkdrives
# Store browser history.
59  23 *   *   *$HOME/cron/mozhist
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Problem with BASH and [ ! -t 0 ] test.

2009-02-18 Thread GESBBB
I am using this snippet of code in a bash script that is run via CRON.
 
 
snippet
# See if we are running via CRON
    if [ ! -t 0 ]
  then
# Use the BASH RANDOM function to generate a random number between 0  32767
    RESTING=$((RANDOM/60))
    sleep ${RESTING}
    fi
/snippet
 
 
It runs fine from the console; however, when run via CRON, it outputs this 
error message.
 
Tput: No terminal type specified and no TERM environmental variable.
 
I have Googled about, yet I cannot find an answer. Perhaps some Bash guru can 
assist me.
 
-- 
Gerard
ges...@yahoo.com
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Problem with BASH and [ ! -t 0 ] test.

2009-02-18 Thread Matthew Seaman

-BEGIN PGP SIGNED MESSAGE-
Hash: RIPEMD160

GESBBB wrote:
| I am using this snippet of code in a bash script that is run via CRON.
|
|
| snippet
| # See if we are running via CRON
| if [ ! -t 0 ]
|   then
| # Use the BASH RANDOM function to generate a random number between 0  32767
| RESTING=$((RANDOM/60))
| sleep ${RESTING}
| fi
| /snippet
|
|
| It runs fine from the console; however, when run via CRON, it outputs
this error message.
|
| Tput: No terminal type specified and no TERM environmental variable.
|
| I have Googled about, yet I cannot find an answer. Perhaps some Bash
guru can assist me.
|

jot -r 1 0 546

Cheers,

Matthew

- --
Dr Matthew J Seaman MA, D.Phil.   Flat 3
~  7 Priory Courtyard
PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
~  Kent, CT11 9PW, UK
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.10 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEAREDAAYFAkmcL3YACgkQ8Mjk52CukIxn9ACePfwIwfNo1q1Sp6zPm9zDB4fh
uhcAnjskxg142o6FeMRNLJwrIMZwJFGi
=VPTj
-END PGP SIGNATURE-
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Problem with BASH and [ ! -t 0 ] test.

2009-02-18 Thread Warren Block

On Wed, 18 Feb 2009, GESBBB wrote:


I am using this snippet of code in a bash script that is run via CRON.
 
snippet
# See if we are running via CRON
    if [ ! -t 0 ]
  then
# Use the BASH RANDOM function to generate a random number between 0  32767
    RESTING=$((RANDOM/60))
    sleep ${RESTING}
    fi
/snippet
 
 
It runs fine from the console; however, when run via CRON, it outputs this 
error message.
 
Tput: No terminal type specified and no TERM environmental variable.
 
I have Googled about, yet I cannot find an answer. Perhaps some Bash guru can 
assist me.


cron uses /bin/sh, not bash.

-Warren Block * Rapid City, South Dakota USA___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org

Re: Problem with BASH and [ ! -t 0 ] test.

2009-02-18 Thread Mel
On Wednesday 18 February 2009 10:40:47 Warren Block wrote:
 On Wed, 18 Feb 2009, GESBBB wrote:
  I am using this snippet of code in a bash script that is run via CRON.
   
  snippet
  # See if we are running via CRON
      if [ ! -t 0 ]
    then
  # Use the BASH RANDOM function to generate a random number between 0 
  32767 RESTING=$((RANDOM/60))
      sleep ${RESTING}
      fi
  /snippet
   
   
  It runs fine from the console; however, when run via CRON, it outputs
  this error message. 
  Tput: No terminal type specified and no TERM environmental variable.
   
  I have Googled about, yet I cannot find an answer. Perhaps some Bash guru
  can assist me.

 cron uses /bin/sh, not bash.

No. cron uses execvp, which will:
1) execute as binary if header is recognized
2) execute with whatever the she-bang says (#!)
3) run as /bin/sh /path/to/file if 1) and 2) fail.

Can't reproduce the error though, using:
#!/usr/local/bin/bash

unset TERM
sleep 1;

if [ ! -t 0 ]; then
echo No term  out
else
echo term  out
fi

I run as:
daemon ./test.sh 2err

then logout the ssh session, so terminal becomes invalid. It correctly says 
term and no term, no tput errors. Same for /bin/sh, by the way.

-- 
Mel

Problem with today's modular software: they start with the modules
and never get to the software part.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Problem with BASH and [ ! -t 0 ] test.

2009-02-18 Thread GESBBB
 From: Matthew Seaman m.sea...@infracaninophile.co.uk
 GESBBB wrote:
 | I am using this snippet of code in a bash script that is run via CRON.
 |
 |
 | 
 | # See if we are running via CRON
 |    if [ ! -t 0 ]
 |      then
 | # Use the BASH RANDOM function to generate a random number between 0  32767
 |        RESTING=$((RANDOM/60))
 |        sleep ${RESTING}
 |    fi
 | 
 |
 |
 | It runs fine from the console; however, when run via CRON, it outputs
 this error message.
 |
 | Tput: No terminal type specified and no TERM environmental variable.
 |
 | I have Googled about, yet I cannot find an answer. Perhaps some Bash
 guru can assist me.
 |
 
 jot -r 1 0 546
 
     Cheers,
 
     Matthew

I am a little confused. I believe the problem is with the if [ ! -t 0 ] 
statement. I tried to redirect the error message; however, it still appears in 
the email sent by CRON. I tried using this statement instead: if ( ! tty -s  
/dev/null ) and if ( ! tty -s )  /dev/null; however, they also produce an 
error message although the function does work correctly. Is this just something 
I should just ignore, or is there a way to stop the message from being sent in 
the CRON report?

-- 
Gerard
ges...@yahoo.com
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Problem with BASH and [ ! -t 0 ] test.

2009-02-18 Thread Chuck Swiger

On Feb 18, 2009, at 12:29 PM, GESBBB wrote:
I am a little confused. I believe the problem is with the if [ ! -t  
0 ] statement. I tried to redirect the error message; however, it  
still appears in the email sent by CRON. I tried using this  
statement instead: if ( ! tty -s  /dev/null ) and if ( ! tty -s )  
 /dev/null; however, they also produce an error message although  
the function does work correctly. Is this just something I should  
just ignore, or is there a way to stop the message from being sent  
in the CRON report?


For Bourne shell, classic /bin/sh, and related shells (zsh, ksh), you  
can use something like:


case $- in
*i*)
# do stuff for an interactive shell
echo interactive
;;
*)
# not interactive
echo not interactive
;;
esac

Regards,
--
-Chuck

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Problem with BASH and [ ! -t 0 ] test.

2009-02-18 Thread Jonathan Chen
On Wed, Feb 18, 2009 at 07:18:03AM -0800, GESBBB wrote:
 I am using this snippet of code in a bash script that is run via CRON.
 ?
 ?
 snippet
 # See if we are running via CRON
 ??? if [ ! -t 0 ]
 ? then
 # Use the BASH RANDOM function to generate a random number between 0  32767
 ??? RESTING=$((RANDOM/60))
 ??? sleep ${RESTING}
 ??? fi
 /snippet
 ?
 ?
 It runs fine from the console; however, when run via CRON, it outputs this 
 error message.
 ?
 Tput: No terminal type specified and no TERM environmental variable.

Bash is looking up the user's bash startup-scripts, and one of the
script commands assumes that it's running on a terminal.
-- 
Jonathan Chen j...@chen.org.nz
--
 In mathematics you don't understand things.
   You just get used to them.
 - Johann von Neumann
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: FreeBSD 6.3/7.1 and Linux disk performance test

2009-02-08 Thread Kris Kennaway

Omer Faruk Sen wrote:

as you can see there is a big difference in just simple dd test. Is
there additional steps that I can follow to increase performance?


Use a benchmark that matches your actual workload, and then see how 
things look.  I would be surprised if your target workload was dd :-)


Kris

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


FreeBSD 6.3/7.1 and Linux disk performance test

2009-02-07 Thread Omer Faruk Sen
Hi,

I have installed a new server to test performance results. BIOS and
RAID BIOS is the latest in this server ( Raid controller is a Intel
SRCSASBB8I )



# dmesg |grep -i mfi
mfi0: LSI MegaSAS 1078 port 0x2000-0x20ff mem
0xb8b0-0xb8b3,0xb8b4-0xb8b7 irq 16 at device 0.0 on
pci10
mfi0: Megaraid SAS driver Ver 3.00
mfi0: 1870 (287314652s/0x0020/info) - Shutdown command received from host
mfi0: 1871 (boot + 3s/0x0020/info) - Firmware initialization started
(PCI ID 0060/1000/1013/8086)
mfi0: 1872 (boot + 3s/0x0020/info) - Firmware version 1.20.72-0562
mfi0: 1873 (boot + 3s/0x0020/info) - Board Revision
mfi0: 1874 (boot + 15s/0x0002/info) - Inserted: PD 08(e0xff/s8)
mfi0: 1875 (boot + 15s/0x0002/info) - Inserted: PD 08(e0xff/s8) Info:
enclPd=, scsiType=0, portMap=00,
sasAddr=5000c5000bcb90b1,
mfi0: 1876 (boot + 15s/0x0002/info) - Inserted: PD 09(e0xff/s9)
mfi0: 1877 (boot + 15s/0x0002/info) - Inserted: PD 09(e0xff/s9) Info:
enclPd=, scsiType=0, portMap=01,
sasAddr=5000c5000bcb962d,
mfi0: 1878 (boot + 15s/0x0002/info) - Inserted: PD 0a(e0xff/s10)
mfi0: 1879 (boot + 15s/0x0002/info) - Inserted: PD 0a(e0xff/s10) Info:
enclPd=, scsiType=0, portMap=02,
sasAddr=5000c5000bcb8f8d,
mfi0: [ITHREAD]
mfi0: 1880 (287314711s/0x0020/info) - Time established as 02/07/09
9:38:31; (52 seconds since power on)
mfid0: MFI Logical Disk on mfi0
mfid0: 556928MB (1140588544 sectors) RAID volume ''


I have installed RHEL 5.3 x64 on this server and here is simple dd
performance test:

Last login: Fri Feb  6 12:15:32 2009 from 10.0.0.51
[r...@localhost ~]# dd if=/dev/zero of=bigfile bs=8192 count=10
10+0 records in
10+0 records out
81920 bytes (819 MB) copied, 1.8473 seconds, 443 MB/s
[r...@localhost ~]# dd if=/dev/zero of=bigfile bs=8192 count=10
10+0 records in
10+0 records out
81920 bytes (819 MB) copied, 2.05412 seconds, 399 MB/s
[r...@localhost ~]# dd if=/dev/zero of=bigfile bs=8192 count=10
10+0 records in
10+0 records out
81920 bytes (819 MB) copied, 1.94096 seconds, 422 MB/s
[r...@localhost ~]# dd if=/dev/zero of=bigfile bs=8192 count=10
10+0 records in
10+0 records out
81920 bytes (819 MB) copied, 2.1092 seconds, 388 MB/s
[r...@localhost ~]# dd if=/dev/zero of=bigfile bs=8192 count=10
10+0 records in
10+0 records out
81920 bytes (819 MB) copied, 1.84414 seconds, 444 MB/s
[r...@localhost ~]# dd if=/dev/zero of=bigfile bs=8192 count=10
10+0 records in
10+0 records out
81920 bytes (819 MB) copied, 2.09829 seconds, 390 MB/s

And after that I have tested with FreeBSD 6.3 and 7.1:

6.3:

# dd if=/dev/zero of=bigfile bs=8192 count=10
10+0 records in
10+0 records out
81920 bytes transferred in 3.534685 secs (231760388 bytes/sec)
# cd /var/tmp/
# dd if=/dev/zero of=bigfile bs=8192 count=10
10+0 records in
10+0 records out
81920 bytes transferred in 3.051668 secs (268443342 bytes/sec)
# cd /
# cd /var/tmp/
# dd if=/dev/zero of=bigfile bs=8192 count=10
10+0 records in
10+0 records out
81920 bytes transferred in 3.001266 secs (272951481 bytes/sec)
# cd /home/
cd: can't cd to /home/
# cd /usr/
# dd if=/dev/zero of=bigfile bs=8192 count=10
10+0 records in
10+0 records out
81920 bytes transferred in 3.678156 secs (222720290 bytes/sec)
# cd /boot
# dd if=/dev/zero of=bigfile bs=8192 count=10
cd /usr/10+0 records in
10+0 records out
81920 bytes transferred in 2.985471 secs (274395563 bytes/sec)
# local
# pwd
/usr/local
# dd if=/dev/zero of=bigfile bs=8192 count=10
10+0 records in
10+0 records out
81920 bytes transferred in 3.501986 secs (233924406 bytes/sec)

7.1:

Filesystem   SizeUsed   Avail Capacity  Mounted on
/dev/mfid0s1a9.7G2.6G6.3G29%/
devfs1.0K1.0K  0B   100%/dev
/dev/mfid0s1d478G4.0K440G 0%/opt
# dd if=/dev/zero of=bigfile bs=8192 count=10
10+0 records in
10+0 records out
81920 bytes transferred in 3.441476 secs (238037393 bytes/sec)
# cd /
# dd if=/dev/zero of=bigfile bs=8192 count=10
10+0 records in
10+0 records out
81920 bytes transferred in 3.132512 secs (261515371 bytes/sec)
# cd /usr/local/
# dd if=/dev/zero of=bigfile bs=8192 count=10
10+0 records in
10+0 records out
81920 bytes transferred in 3.296514 secs (248504951 bytes/sec)

# cd /usr
# dd if=/dev/zero of=bigfile bs=8192 count=10
10+0 records in
10+0 records out
81920 bytes transferred in 3.069655 secs (266870386 bytes/sec)

as you can see there is a big difference in just simple dd test. Is
there additional steps that I can follow to increase performance? By
the way If I use write-thru cache on this raid card FreeBSD 6.3 and
FreeBSD 7.1 only gives 13MB/s~ which is very very bad. Linux gives a
slight decrease on dd test with write-thru cache but freebsd goes from
230-270 MB

Re: FreeBSD 6.3/7.1 and Linux disk performance test

2009-02-07 Thread Robert Watson


On Sat, 7 Feb 2009, Omer Faruk Sen wrote:

I have installed a new server to test performance results. BIOS and RAID 
BIOS is the latest in this server ( Raid controller is a Intel SRCSASBB8I )


Hi Omer--

Comparing I/O and file system performance is a bit fraught with peril, 
especially given that the performance of disks varies a great deal based on 
where on the disk you're writing, etc.  Ellard and Seltzer have a nice NFS 
benchmarking paper that includes a Benchmarking traps section of note in 
this regard:


  http://www.eecs.harvard.edu/~margo/papers/freenix03/

The source of the performance difference you're seeing could come from a 
number of places:


- I/O to different parts of the disk due to partition layouts can perform
  quite differently -- try out diskinfo -t to get an idea of the kind of
  variance you can see.  For example, I get this on my local 3ware array:

  Transfer rates:
outside:   102400 kbytes in   4.056540 sec =25243 kbytes/sec
middle:102400 kbytes in   2.531003 sec =40458 kbytes/sec
inside:102400 kbytes in   3.947725 sec =25939 kbytes/sec

  That's a massive performance difference and presumably entirely a result of
  disk layout.  The best way to address this is to make sure you're using the
  same part of the disk for all tests -- so if you're installing different
  OS's on different partitions, use a single shared partition for the test.

- File system can behave quite differently, especially if they vary in size
  and layout strategies.  Do the dd(1) directly to a disk partition, making
  sure to use the right device on Linux (I believe you want the character
  device in order to bypass the buffer cache and compare apples to apples).

So if you go ahead and do dd(1) directly to the same partition using 
unbuffered I/O and no file system, it should become more obvious as to whether 
we're looking at performance loss due to a device driver difference, a file 
system difference, or perhaps just a disk layout difference.


Robert N M Watson
Computer Laboratory
University of Cambridge





# dmesg |grep -i mfi
mfi0: LSI MegaSAS 1078 port 0x2000-0x20ff mem
0xb8b0-0xb8b3,0xb8b4-0xb8b7 irq 16 at device 0.0 on
pci10
mfi0: Megaraid SAS driver Ver 3.00
mfi0: 1870 (287314652s/0x0020/info) - Shutdown command received from host
mfi0: 1871 (boot + 3s/0x0020/info) - Firmware initialization started
(PCI ID 0060/1000/1013/8086)
mfi0: 1872 (boot + 3s/0x0020/info) - Firmware version 1.20.72-0562
mfi0: 1873 (boot + 3s/0x0020/info) - Board Revision
mfi0: 1874 (boot + 15s/0x0002/info) - Inserted: PD 08(e0xff/s8)
mfi0: 1875 (boot + 15s/0x0002/info) - Inserted: PD 08(e0xff/s8) Info:
enclPd=, scsiType=0, portMap=00,
sasAddr=5000c5000bcb90b1,
mfi0: 1876 (boot + 15s/0x0002/info) - Inserted: PD 09(e0xff/s9)
mfi0: 1877 (boot + 15s/0x0002/info) - Inserted: PD 09(e0xff/s9) Info:
enclPd=, scsiType=0, portMap=01,
sasAddr=5000c5000bcb962d,
mfi0: 1878 (boot + 15s/0x0002/info) - Inserted: PD 0a(e0xff/s10)
mfi0: 1879 (boot + 15s/0x0002/info) - Inserted: PD 0a(e0xff/s10) Info:
enclPd=, scsiType=0, portMap=02,
sasAddr=5000c5000bcb8f8d,
mfi0: [ITHREAD]
mfi0: 1880 (287314711s/0x0020/info) - Time established as 02/07/09
9:38:31; (52 seconds since power on)
mfid0: MFI Logical Disk on mfi0
mfid0: 556928MB (1140588544 sectors) RAID volume ''


I have installed RHEL 5.3 x64 on this server and here is simple dd
performance test:

Last login: Fri Feb  6 12:15:32 2009 from 10.0.0.51
[r...@localhost ~]# dd if=/dev/zero of=bigfile bs=8192 count=10
10+0 records in
10+0 records out
81920 bytes (819 MB) copied, 1.8473 seconds, 443 MB/s
[r...@localhost ~]# dd if=/dev/zero of=bigfile bs=8192 count=10
10+0 records in
10+0 records out
81920 bytes (819 MB) copied, 2.05412 seconds, 399 MB/s
[r...@localhost ~]# dd if=/dev/zero of=bigfile bs=8192 count=10
10+0 records in
10+0 records out
81920 bytes (819 MB) copied, 1.94096 seconds, 422 MB/s
[r...@localhost ~]# dd if=/dev/zero of=bigfile bs=8192 count=10
10+0 records in
10+0 records out
81920 bytes (819 MB) copied, 2.1092 seconds, 388 MB/s
[r...@localhost ~]# dd if=/dev/zero of=bigfile bs=8192 count=10
10+0 records in
10+0 records out
81920 bytes (819 MB) copied, 1.84414 seconds, 444 MB/s
[r...@localhost ~]# dd if=/dev/zero of=bigfile bs=8192 count=10
10+0 records in
10+0 records out
81920 bytes (819 MB) copied, 2.09829 seconds, 390 MB/s

And after that I have tested with FreeBSD 6.3 and 7.1:

6.3:

# dd if=/dev/zero of=bigfile bs=8192 count=10
10+0 records in
10+0 records out
81920 bytes transferred in 3.534685 secs (231760388 bytes/sec)
# cd /var/tmp/
# dd if=/dev/zero of=bigfile bs=8192 count=10
10+0 records in
10+0 records out
81920 bytes transferred in 3.051668 secs (268443342 bytes/sec)
# cd /
# cd /var/tmp/
# dd if=/dev

TEST

2009-01-27 Thread Rem P Roberti
Test
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: TEST

2009-01-27 Thread nicodache
did not work. please try again.

On Tue, Jan 27, 2009 at 6:45 PM, Rem P Roberti remeg...@comcast.net wrote:
 Test
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: bash versus sh test builtin

2009-01-12 Thread Karl Vogel
 On Sun, 11 Jan 2009 20:08:18 -0600, 
 Jeffrey Goldberg jeff...@goldmark.org said:

J if [ $UID -ne 0 ] ; then ...
J Does anyone have a recommendation of how to run this simple test in /bin/sh
J and how to write tests reasonably portably?

   I think your best bet for comparisons like this is to use case.  I started
   doing that back in the days when '[' would start a separate program:

 case $UID in
   0) echo am root ;;
   *) echo not root ;;
 esac

   I use test for things relating to file access:

 die() {
 echo $@  2
 exit 1
 }

 test -f /etc/passwd || die Your system is seriously hosed

-- 
Karl Vogel  I don't speak for the USAF or my company

If men ruled the world #12: Instead of wasting money on an expensive
engagement ring, your fiancee would get a giant foam hand that said,
You're #1!
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


bash versus sh test builtin

2009-01-11 Thread Jeffrey Goldberg
The -ne operator for [ in /bin/sh doesn't seem to work as in bash.   
Also the bash behavior here is what matches /bin/[ most closely.



$ /bin/sh
$ if [ $UID -ne 0 ] ; then
 echo not root
 fi
[: -ne: unexpected operator
$ exit
$ echo $SHELL
/usr/local/bin/bash
[jeff...@dobby ~/src/mount-rsnap]$ if [ $UID -ne 0 ] ; then
 echo not root
 fi
not root

Does anyone have a recommendation of how to run this simple test in / 
bin/sh and how to write tests reasonably portably?


-j

--
Jeffrey Goldberghttp://www.goldmark.org/jeff/

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: bash versus sh test builtin

2009-01-11 Thread Dan Nelson
In the last episode (Jan 11), Jeffrey Goldberg said:
 The -ne operator for [ in /bin/sh doesn't seem to work as in bash.   
 Also the bash behavior here is what matches /bin/[ most closely.
 
 $ /bin/sh
 $ if [ $UID -ne 0 ] ; then
   echo not root
   fi
 [: -ne: unexpected operator
 $ exit
 $ echo $SHELL
 /usr/local/bin/bash
 [jeff...@dobby ~/src/mount-rsnap]$ if [ $UID -ne 0 ] ; then
   echo not root
   fi
 not root
 
 Does anyone have a recommendation of how to run this simple test in / 
 bin/sh and how to write tests reasonably portably?

UID=$(id -u)
if [ $UID -ne 0 ] ; then
 echo not root
fi

UID is not a variable set by /bin/sh, which is why the test fails.

http://www.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_05_03

-- 
Dan Nelson
dnel...@allantgroup.com
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: bash versus sh test builtin

2009-01-11 Thread Jeffrey Goldberg

On Jan 11, 2009, at 9:07 PM, Dan Nelson wrote:


UID=$(id -u)
if [ $UID -ne 0 ] ; then
echo not root
fi

UID is not a variable set by /bin/sh, which is why the test fails.


Ah.  Thank you.  I was, as you see, barking up the wrong tree.  Thank  
you for setting me strait on this.


Cheers,

-j

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: bash versus sh test builtin

2009-01-11 Thread George Davidovich
On Sun, Jan 11, 2009 at 08:08:18PM -0600, Jeffrey Goldberg wrote:
 The -ne operator for [ in /bin/sh doesn't seem to work as in bash.   
 Also the bash behavior here is what matches /bin/[ most closely.
 
 $ /bin/sh
 $ if [ $UID -ne 0 ] ; then
   echo not root
   fi
 [: -ne: unexpected operator
 $ exit
 $ echo $SHELL
 /usr/local/bin/bash
 [jeff...@dobby ~/src/mount-rsnap]$ if [ $UID -ne 0 ] ; then
   echo not root
   fi
 not root
 
 Does anyone have a recommendation of how to run this simple test in / 
 bin/sh 

if [ $(id -u) -ne 0 ]; then ...

As to why your test isn't working as expected, rewrite your script to
read:

#!/bin/sh
echo $UID

and you'll discover that UID is a bash environmental variable.

 and how to write tests reasonably portably?

That's a different question, and merits a much longer discussion
probably better had elsewhere.  I'd suggest comp.unix.shell.

-- 
George
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


  1   2   3   4   5   >