New to FreeBsd

2011-01-03 Thread George George
I am new to the Free BSD and i have a question on how to install a
packet.What i have to type to download a python editor?I cant find the right
packet name.Thank you very much.
___
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: New to FreeBsd

2011-01-03 Thread Julian Fagir
Hi,

> I am new to the Free BSD and i have a question on how to install a
> packet.What i have to type to download a python editor?I cant find the right
> packet name.Thank you very much.
there are mainly two ways to install packages - via ports (i.e. you compile
it yourself) or via pkg_add. The first is usually the preferred way, but you
need to have the ports-collection installed.

You can read about the packages system in the handbook:
  http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/ports.html

Regards, Julian


signature.asc
Description: PGP signature


Re: New to FreeBsd

2011-01-03 Thread Pete
On Mon, Jan 03, 2011 at 04:16:13PM +0200, George George wrote:
> I am new to the Free BSD and i have a question on how to install a
> packet.What i have to type to download a python editor?I cant find the right
> packet name.Thank you very much.

Hello George,

If you mean 'packages' then start reading here :

http://www.freebsd.org/doc/handbook/ports.html


You'll want to look at chapter 4.4 specifically. I prefer ports as you can
customise the creation of the program to include or omit certain
capabilities.

I'm not sure which editor you need but here's a page that lists a few :

http://wiki.python.org/moin/PythonEditors


As far as I know 'packets' are created using TCP/IP which is very basically
how data is transferred across a computer network.

Regards,

Pete.
___
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: New to FreeBsd

2011-01-03 Thread Mike Jeays
On Mon, 3 Jan 2011 16:16:13 +0200
George George  wrote:

> I am new to the Free BSD and i have a question on how to install a
> packet.What i have to type to download a python editor?I cant find the right
> packet name.Thank you very much.
> ___
> 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"

pkg_add -r gedit
will install the gedit package, for example. There are thousands of packages 
available.
pkg_add -r idle should get you the python interactive development tool.

(Note they are called packages, not packets. They are pre-compiled binaries all 
ready to be used.)
___
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"


PCIe SAS RAID controller for FreeBSD

2011-01-03 Thread Per olof Ljungmark
Hi,

Could someone please recommend a 2- or 4-channel SAS PCI-e 4x RAID
controller that works with 8-STABLE and is generally available?

Thanks!
___
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 8.1-STABLE amd 64 crash during shutdown

2011-01-03 Thread Janos Dohanics
My system crashed during shutdown, so I tried to get a crash dump, but
I don't seem to be able to do so:

Dumping 1224 MB: (stops at 1177)

Fatal trap 12: page fault while in kernel mode
cpuid = 1, apic id = 01
fault virtual address = 0x1
fault code= supervisor read instruction, page not present
instruction pointer: 0x20:0x1

uname -opr
FreeBSD 8.1-STABLE amd64

I'd appreciate your advice...

-- 
Janos Dohanics

___
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: New to FreeBsd

2011-01-03 Thread Nick Cooper
make sure your ports are up to date
#portsnap fetch
#portsnap extract

change into the port directory
#cd /usr/ports

you can search through ports using these command in /usr/ports
#make search name=python
or
#make search key=python


On Mon, Jan 3, 2011 at 9:16 AM, George George wrote:

> I am new to the Free BSD and i have a question on how to install a
> packet.What i have to type to download a python editor?I cant find the
> right
> packet name.Thank you very much.
> ___
> 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"


9650SE-2LP raid card locks system

2011-01-03 Thread Troy Beisigl

Hi All,

We have been seeing a problem with FreeBSD 7.3 and up where the system  
will just hang when using a 9650SE-2LP raid card and 2 500G drives  
mirrored. The system will run for about a week and then the filesystem  
just hangs, causing the system to hang. We've looked through the logs  
and found nothing at all. We have changed the card and then the  
motherboard but the problem still exists. We have run this card with  
CentOS without fail in the same system configuration.


If the card is not supported, can anyone recommend one that does work?

Thanks,

Troy Beisigl




___
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: 9650SE-2LP raid card locks system

2011-01-03 Thread Mike Tancsa

I have a number of these cards and they work very well for us.  What
version of the firmware are you using on the card ?

I have this on a busy db server. But its RELENG8.

twa0: <3ware 9000 series Storage Controller> port 0x1000-0x10ff mem
0xb000-0xb1ff,0xb400-0xb4000fff irq 19 at device 0.0 on pci12
twa0: [ITHREAD]
twa0: INFO: (0x15: 0x1300): Controller details:: Model 9650SE-2LP, 2
ports, Firmware FE9X 3.08.00.016, BIOS BE9X 3.08.00.004

I have had good luck with Areca cards as well, but they start in 4 port
models.  But really, all should work just fine with this 3ware/LSI card

---Mike




On 1/3/2011 3:58 PM, Troy Beisigl wrote:
> Hi All,
> 
> We have been seeing a problem with FreeBSD 7.3 and up where the system
> will just hang when using a 9650SE-2LP raid card and 2 500G drives
> mirrored. The system will run for about a week and then the filesystem
> just hangs, causing the system to hang. We've looked through the logs
> and found nothing at all. We have changed the card and then the
> motherboard but the problem still exists. We have run this card with
> CentOS without fail in the same system configuration.
> 
> If the card is not supported, can anyone recommend one that does work?
> 
> Thanks,
> 
> Troy Beisigl
> 
> 
> 
> 
> ___
> 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: Portupgrade status

2011-01-03 Thread Jamie Paul Griffin
so can i just ask, is portmaster or another port upgrading tool recommended 
over portupgrade now because i'm going to be upgrading all my ports soon and  
in the 18 months i've been using FreeBSD i've always used portupgrade but 
sounds like it's best to change now.

jamie
___
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: Portupgrade status

2011-01-03 Thread ill...@gmail.com
On 3 January 2011 17:54, Jamie Paul Griffin  wrote:
> so can i just ask, is portmaster or another port upgrading tool recommended 
> over portupgrade now because i'm going to be upgrading all my ports soon and  
> in the 18 months i've been using FreeBSD i've always used portupgrade but 
> sounds like it's best to change now.
>
>        jamie

Unless you particularly despise some aspect
or feature of portupgrade, I can see little point
in switching.

Portmaster has the advantage of not requiring
ruby or an external database, but the disadvan-
tage of not having an equivalent of
# portupgrade -Rf
(at least last time I used it)

-- 
--
___
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: Portupgrade status

2011-01-03 Thread Chris Brennan
On Mon, Jan 3, 2011 at 6:37 PM, ill...@gmail.com  wrote:

> On 3 January 2011 17:54, Jamie Paul Griffin  wrote:
> > so can i just ask, is portmaster or another port upgrading tool
> recommended over portupgrade now because i'm going to be upgrading all my
> ports soon and  in the 18 months i've been using FreeBSD i've always used
> portupgrade but sounds like it's best to change now.
> >
> >jamie
>
> Unless you particularly despise some aspect
> or feature of portupgrade, I can see little point
> in switching.
>
> Portmaster has the advantage of not requiring
> ruby or an external database, but the disadvan-
> tage of not having an equivalent of
> # portupgrade -Rf
> (at least last time I used it)
>
>

man portmaster reveals

 [-R] -f
 always rebuild ports (overrides -i)


C-
___
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"


use can't open tap

2011-01-03 Thread Peter Vereshagin
You know St. Peter won't call my name, freebsd-questions!

Recently I upgraded the base system (7.3-stable to 7.4-prerelease) and my qemu
can not open tap device after that:
===
# ifconfig tap4 create 
# chmod o+rw /dev/tap4
# ls -l /dev/tap4
crw-rw-rw-  1 root  qemu0, 249 Jan  3 18:59 /dev/tap4
# :> /dev/tap4
# su - user
$ id
uid=X(user) gid=X(user) groups=X(user), ,(qemu)
$ :> /dev/tap4
-su: /dev/tap4: Operation not permitted
===

Is anything wrong here with the system?

qemu is traced like this
===
  3580 qemu STRU  struct stat {dev=117505792, ino=234, mode=crw--w , 
nlink=1, uid=10010, gid=4, rdev=234, atime=1294095695, stime=1294095695, 
ctime=1294095695, birthtime=-1, size=0, blksize=4096, blocks=0, flags=0x0 }
  3580 qemu RET   fstat 0
  3580 qemu CALL  clock_gettime(0x4,0xbfbfe5c0)
  3580 qemu RET   clock_gettime 0
  3580 qemu CALL  sigaction(SIGALRM,0xbfbfe47c,0)
  3580 qemu RET   sigaction 0
  3580 qemu CALL  setitimer(0,0xbfbfe494,0)
  3580 qemu RET   setitimer 0
  3580 qemu CALL  open(0xbfbfe2ec,O_RDWR,0)
  3580 qemu NAMI  "/dev/tap4"
  3580 qemu RET   open -1 errno 1 Operation not permitted
  3580 qemu CALL  write(0x2,0xbfbfcfc0,0x5a)
  3580 qemu GIO   fd 2 wrote 90 bytes
   "warning: could not open /dev/tap4 (Operation not permitted): no virtual 
network emulation
   "
===

and qemu runs well as a root user. sysctl looks like this:
===
$ sysctl -a | grep tap
net.link.tap.debug: 1
net.link.tap.devfs_cloning: 1
net.link.tap.up_on_open: 1
net.link.tap.user_open: 1
debug.if_tap_debug: 1
hw.ata.atapi_dma: 1
hw.psm.tap_timeout: 125000
hw.psm.tap_threshold: 25
dev.atapci.0.%desc: VIA 8233A UDMA133 controller
dev.atapci.0.%driver: atapci
dev.atapci.0.%location: slot=17 function=1 handle=\_SB_.PCI0.IDE0
dev.atapci.0.%pnpinfo: vendor=0x1106 device=0x0571 subvendor=0x1043 
subdevice=0x808c class=0x01018a
dev.atapci.0.%parent: pci0
dev.ata.0.%parent: atapci0
dev.ata.1.%parent: atapci0
dev.atapicam.0.%desc: ATAPI CAM Attachment
dev.atapicam.0.%driver: atapicam
dev.atapicam.0.%parent: ata0
dev.atapicam.1.%desc: ATAPI CAM Attachment
dev.atapicam.1.%driver: atapicam
dev.atapicam.1.%parent: ata1
===

Should I report this as a bug?
Thank you.

73! Peter pgp: A0E26627 (4A42 6841 2871 5EA7 52AB  12F8 0CE1 4AAC A0E2 6627)
--
http://vereshagin.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: Portupgrade status

2011-01-03 Thread ill...@gmail.com
On 3 January 2011 18:39, Chris Brennan  wrote:
> On Mon, Jan 3, 2011 at 6:37 PM, ill...@gmail.com  wrote:
>>
>> On 3 January 2011 17:54, Jamie Paul Griffin  wrote:
>> > so can i just ask, is portmaster or another port upgrading tool
>> > recommended over portupgrade now because i'm going to be upgrading all my
>> > ports soon and  in the 18 months i've been using FreeBSD i've always used
>> > portupgrade but sounds like it's best to change now.
>> >
>> >        jamie
>>
>> Unless you particularly despise some aspect
>> or feature of portupgrade, I can see little point
>> in switching.
>>
>> Portmaster has the advantage of not requiring
>> ruby or an external database, but the disadvan-
>> tage of not having an equivalent of
>> # portupgrade -Rf
>> (at least last time I used it)
>>
>
>
> man portmaster reveals
>
>  [-R] -f
>  always rebuild ports (overrides -i)
>
>

No, the -R flag in portmaster tells it to not rebuild
ports taht have already been built on this run (I
believe from reading man portmaster).  The -R
flag in portupgrade rebuilds the ports on which
the named port depends
-R
--upward-recursive Act on all those packages required by the given
packages as well. (When specified with -F, fetch
recursively, including the brand new, uninstalled
ports that an upgraded port requires)

I don't see any equivalent functionality for portmaster,
sadly.


Example scenario:  firefox is failing to start & keeps
throwing weird gtk errors, even after rebuilding gtk &
firefox.  So you issue "portupgrade -Rf firefox\*".
Well, it has fixed stuff in the dim & distant past, any
way.

-- 
--
___
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: a new hard-drive in a 2y/o laptop

2011-01-03 Thread Chris Brennan
I was not around the computer yesterday to reply to these in a timely matter
and replying to each one just got confusing since gmail appends all of my
replies to the bottom of the thread and not after the person I replied to. I
got the reply header to each person and went that route

| Reply header, who said what.
| > Their reply
|
| My Reply

On Sun, Jan 2, 2011 at 1:39 AM, Michael Powell 
wrote:
> No. I used the of=/dev/ad4 as described above. However, I think you've hit
> the nail on the head on one aspect. I believe that 6.2 disk was originally
> set up as "dangerously dedicated". It was so long ago and I had forgotten
> all about it, but this does dovetail with what your are getting at.

That may be so for you, but nothing less then FreeBSD8.1 or a Gentoo LiveCD
has
touched this drive. Gentoo only yo prove to myself that a sucessful ext4
filesystem could be created. GPT/GEOM wasn't used, I used all standard
disk-creation methods as described in the gentoo handbook. I also used
Gentoo's
gpart utilities to independatly verify that any artifacts of GPT/GEOM were
removed (which they were).

> The machine that disk went into had been upgraded completely through the
7.x
> series and on to 8.0-Release before it's disk went up in smoke(literally).
I
> was attempting to do a fresh 'minimal' install of 8.0-Release to the old
6.2
> disk pulled off a shelf prior to doing restore(s) of a dump from just the
> day before. It was only done because it could be done immediately, and a
> newer, larger, better replacement procured after the fact.

This is actually something I fear in reinstalling my other FreeBSD system,
which
is currently 7.3, which has been upgraded successfully from 6.1. But ports
has
gotten out of hand and I'm rather tired of trying to fix each port, one at a

time when there are prolly hundreds currently installed.

> Exact copy of error from my notes here:

> "Unable to find device node for /dev/ad4s1b in /dev! The creation of
> filesystems will be aborted." Then pressing "OK" brings this: "Couldn't
make
> filesystems properly. Aborting."

Yes, this is exactly the same error I get. While that is the same, I think
there
is an underlying issue here that is causing my issue that doesn't exactly
pertain
to 'dangerously dedicated'.

> This from sysinstall and occurs after fdisk, labeling, at the point when
> sysinstall then tries to write out the config to the disk and newfs.

Yerp, sysinstalls pukes at newfs/swap creation, when it can't find
/dev/ad4s1b
(which is swap)

> Or any other form of 'garbage'. I'd use the 8.1 LiveFS CD myself just as a
> personal preference - but either approach should do the job.

Well, the garbage I reported was because of a typo on my part.

> Yes - I agree. Would also be nice to examine it afterward with a hex
editor
> to actually see *if* all writes were zero.  Any 'ones' sprinkled in there,
> especially in the region of the disk we are talking about would indicate
> corruption. And my wild guess if this is the situation it may possibly
> indicate some form of subtle hardware incompatibility most likely a clash
of
> firmwares, e.g. controller and disk(s).  Some form of non-standard
> controller implementation, especially wrt to its firmware being buggy.

If someone provides the command for this, I will happily run it and see if
the
output is all zero's...

> In the OEM world of the likes of HP, DELL, etc, when this happens a lot of
> times they kludge together a work around driver that you can get from
their
> tech support. It masks the hardware/firmware problem in software, and is
> almost always a Windows-centric thing.

*shudder* that's all, just *shudder*

> Bad thing here is the old: "but it worked in 7.x, only fails with 8.x...".
> Whenever I see _that_ I think "developer involvement/smarter people than
me
> required...".

Well, the irony here, the failing drive is *ALSO* 8.1, I can slap that back
in
and fire it up, it still boots and works, I just didn't want to take the
risk
of the drive's cheese sliding off it's cracker.

> I use knode and gmane. I also know that (IIRC) you're supposed to reply by
> email and CC: the list. There is a set of configs which allow one to
> configure knode to do just this, however, the last two times I've tried it
> knode crashed horribly. That was a couple of small revisions of KDE ago,
so
> I should soon revisit this myself and see if the bug has ever gotten any
> love.

GMail's (Google for Domains) threadding is a bit awkwards to get used to at
first but works out rather nicely once you get used to it.

On Sun, Jan 2, 2011 at 2:19 AM, Ian Smith  wrote:
> On /dev/ad4, oseek=0 zeroes sector 0, the MBR including DOS partition
> (FreeBSD slice) table, so that would kill all the slice data, so sure,
> ad4s1 won't exist.  oseek=1 just zeroes an unused sector as we've seen.

> What you _can_ do from that state is:

> dd if=/dev/zero of=/dev/ad4 oseek=63 count=8

> which will remove the first 4K of (what will be) slice 1, in case
> there'

Re: Portupgrade status

2011-01-03 Thread Jamie Paul Griffin
On Mon, Jan 03, 2011 at 07:51:48PM -0500, ill...@gmail.com wrote:

> No, the -R flag in portmaster tells it to not rebuild
> ports taht have already been built on this run (I
> believe from reading man portmaster).  The -R
> flag in portupgrade rebuilds the ports on which
> the named port depends

Indeed, this -R option is useful. Up-to-now i've not used anything else other 
than portupgrade but i'll have a look over the man pages of portmaster, etc.; 
i'll probably continue to use portupgrade for a while though.

jamie
___
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: Re: 9650SE-2LP raid card locks system

2011-01-03 Thread Troy Beisigl
Hi Mike,

We are running the latest firmware. We upgraded to it in case this was the 
issue. As you can see from the log entry below, it shows the file system was 
not shut down cleanly because it was locked and had to be powered off. We are 
using Intel motherboards, so maybe something with FreeBSD and this card with 
the Intel motherboard? I know that this card works just fine with this board on 
CentOS, so...

Dec 29 17:36:12 web01 kernel: twa0: <3ware 9000 series Storage Controller> port 
0xd000-0xd0ff mem 0xd000-0xd1ff,0xd202-0xd2020fff irq 16 at device 
0.0 on pci1
Dec 29 17:36:12 web01 kernel: twa0: [ITHREAD]
Dec 29 17:36:12 web01 kernel: twa0: WARNING: (0x04: 0x0008): Unclean shutdown 
detected: unit=0
Dec 29 17:36:12 web01 kernel: twa0: INFO: (0x15: 0x1300): Controller details:: 
Model 9650SE-2LP, 2 ports, Firmware FE9X 4.10.00.007, BIOS BE9X 4.08.00.002

Troy Beisigl


> Original Message 
>From: Mike Tancsa 
>To: "Troy Beisigl" 
>Cc: freebsd-questions@freebsd.org
>Sent: Mon, Jan 3, 2011, 13:32 PM
>Subject: Re: 9650SE-2LP raid card locks system
>
>I have a number of these cards and they work very well for us.  What
>version of the firmware are you using on the card ?
>
>I have this on a busy db server. But its RELENG8.
>
>twa0: <3ware 9000 series Storage Controller> port 0x1000-0x10ff mem
>0xb000-0xb1ff,0xb400-0xb4000fff irq 19 at device 0.0 on pci12
>twa0: [ITHREAD]
>twa0: INFO: (0x15: 0x1300): Controller details:: Model 9650SE-2LP, 2
>ports, Firmware FE9X 3.08.00.016, BIOS BE9X 3.08.00.004
>
>I have had good luck with Areca cards as well, but they start in 4 port
>models.  But really, all should work just fine with this 3ware/LSI card
>
>   ---Mike
>
>
>
>
>On 1/3/2011 3:58 PM, Troy Beisigl wrote:
>> Hi All,
>>
>> We have been seeing a problem with FreeBSD 7.3 and up where the system
>> will just hang when using a 9650SE-2LP raid card and 2 500G drives
>> mirrored. The system will run for about a week and then the filesystem
>> just hangs, causing the system to hang. We've looked through the logs
>> and found nothing at all. We have changed the card and then the
>> motherboard but the problem still exists. We have run this card with
>> CentOS without fail in the same system configuration.
>>
>> If the card is not supported, can anyone recommend one that does work?
>>
>> Thanks,
>>
>> Troy Beisigl
>>
>>
>>
>>
>> ___
>> 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"

___
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: randomising tracks: scripting question

2011-01-03 Thread Joseph Olatt
On Sun, Dec 26, 2010 at 05:09:30PM +, Frank Shute wrote:
> 
> I generally play my tracks of an album like so:
> 
> for track in $(cat trombone_shorty-backatown.m3u); do
> mplayer $track
> done
> 
> They then play in the correct order.
> 
> How would I go about randomising the order of play using
> sh (preferably) or perl?
> 
> Sorry for the OT posting but I thought a brainteaser might clear the
> fog caused by excessive Xmas indulgence ;)
> 
> 
> Regards,
> 
> -- 
> 
>  Frank
> 
>  Contact info: http://www.shute.org.uk/misc/contact.html
> 
> 

A little while back I wrote a perl script to randomly pick mp3, 
ogg, flac files from any directory specified as arg 1 and play them
using mplayer. 

I categorize my genres by directory and with this perl script I can
randomly play songs from any directory.

If the script is invoked without any arguments, then it will play songs
from the default hard-coded directory defined by $SONG_DIR.

Don't know if this would be useful to you (or someone else). 


#!/usr/bin/perl -w

use strict;

my $SONG_DIR = "/home/joji/songs/good";

if ($#ARGV == 0)
{
$SONG_DIR = $ARGV[0];
}

my %played = ();
my $rand;
my $dh;
my @song_list;


opendir($dh, $SONG_DIR);
@song_list = readdir($dh);
closedir($dh);

my $count = $#song_list;

# Perl counts from zero. If there is one item, Perl will say 0.
# So to get the real count, we have to increment by 1.
$count++;

chdir($SONG_DIR);

while ((keys %played) < $count)
{
while (1)
{
$rand = int(rand($count));
if (! $played{$rand})
{
$played{$rand} = 1;
last;
}

if ((keys %played) >= $count)
{
last;
}
}

if ($song_list[$rand] eq "." || $song_list[$rand] eq "..")
{
;
}
else
{
print "Playing song # " . $rand . " [" . $song_list[$rand] . "]\n";
`mplayer \"$song_list[$rand]\"`;
}

}

exit(0);
___
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: 9650SE-2LP raid card locks system

2011-01-03 Thread Mike Tancsa
On 1/3/2011 9:14 PM, Troy Beisigl wrote:
> Hi Mike,
> 
> We are running the latest firmware. We upgraded to it in case this was the 
> issue. As you can see from the log entry below, it shows the file system was 
> not shut down cleanly because it was locked and had to be powered off. We are 
> using Intel motherboards, so maybe something with FreeBSD and this card with 
> the Intel motherboard? I know that this card works just fine with this board 
> on CentOS, so...
> 

When it locks up, are you sure its the disk that locks up ?  From the
console, if you do a CTRL+T, what does it show its blocking on ? Are you
able to build a debug kernel to see where things are stuck ?

---Mike

> Dec 29 17:36:12 web01 kernel: twa0: <3ware 9000 series Storage Controller> 
> port 0xd000-0xd0ff mem 0xd000-0xd1ff,0xd202-0xd2020fff irq 16 at 
> device 0.0 on pci1
> Dec 29 17:36:12 web01 kernel: twa0: [ITHREAD]
> Dec 29 17:36:12 web01 kernel: twa0: WARNING: (0x04: 0x0008): Unclean shutdown 
> detected: unit=0
> Dec 29 17:36:12 web01 kernel: twa0: INFO: (0x15: 0x1300): Controller 
> details:: Model 9650SE-2LP, 2 ports, Firmware FE9X 4.10.00.007, BIOS BE9X 
> 4.08.00.002
> 
> Troy Beisigl
> 
> 
>>  Original Message 
>> From: Mike Tancsa 
>> To: "Troy Beisigl" 
>> Cc: freebsd-questions@freebsd.org
>> Sent: Mon, Jan 3, 2011, 13:32 PM
>> Subject: Re: 9650SE-2LP raid card locks system
>>
>> I have a number of these cards and they work very well for us.  What
>> version of the firmware are you using on the card ?
>>
>> I have this on a busy db server. But its RELENG8.
>>
>> twa0: <3ware 9000 series Storage Controller> port 0x1000-0x10ff mem
>> 0xb000-0xb1ff,0xb400-0xb4000fff irq 19 at device 0.0 on pci12
>> twa0: [ITHREAD]
>> twa0: INFO: (0x15: 0x1300): Controller details:: Model 9650SE-2LP, 2
>> ports, Firmware FE9X 3.08.00.016, BIOS BE9X 3.08.00.004
>>
>> I have had good luck with Areca cards as well, but they start in 4 port
>> models.  But really, all should work just fine with this 3ware/LSI card
>>
>>  ---Mike
>>
>>
>>
>>
>> On 1/3/2011 3:58 PM, Troy Beisigl wrote:
>>> Hi All,
>>>
>>> We have been seeing a problem with FreeBSD 7.3 and up where the system
>>> will just hang when using a 9650SE-2LP raid card and 2 500G drives
>>> mirrored. The system will run for about a week and then the filesystem
>>> just hangs, causing the system to hang. We've looked through the logs
>>> and found nothing at all. We have changed the card and then the
>>> motherboard but the problem still exists. We have run this card with
>>> CentOS without fail in the same system configuration.
>>>
>>> If the card is not supported, can anyone recommend one that does work?
>>>
>>> Thanks,
>>>
>>> Troy Beisigl
>>>
>>>
>>>
>>>
>>> ___
>>> 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"
> 
> 
> 

___
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"