Re: Q: recommendation for external USB disk
Hi, just buy the hard disk of your choice and put it into the case of your choice. I use only disks which come with five years warrenty. On 14 January 2010 pm 20:01:08 Matthias Apitz wrote: El día Tuesday, January 12, 2010 a las 08:12:17AM +0100, Bas Smeelen escribió: I use Freecom hard drive XS 1.5TB USB2.0 on our fallback servers as back-up disks. Your /dev/da1s1d let me think that you have created more than one partition... After a bad experience, I use as many slices as the machine uses I take the data from. I also backup the programs. Then, I use for the external disk the same interface which I can use in the machine. So, if the internal hard disk fails, will be able to exchange the disks and boot. Ok, fstab might needs to be edited. Erich ___ 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: OOo question.....
On Sunday 17 January 2010, Gary Kline wrote: On Sat, Jan 16, 2010 at 10:27:59AM +, Mike Clarke wrote: On Saturday 16 January 2010, Gary Kline wrote: [snip] Second q is howto use them for my desktop backgrounds in KDE since, upon rebuild and relaunch, everything is black. the first question is howto save a separate image? or are there other tools to do this? [neither xv nor gv work] Right click on a blank piece of the KDE desktop and select Configure Desktop. This should open with the Change the background settings icon highlighted. In the Background section click the Picture radio button and click the folder icon on the right to browse to your selected image. (Several hours later). I found the place and added three 'wallpapers'; they haven't appeared. Probably will after I've rebooted. The new wallpaper should appear immediately after you click on OK or Apply. ---I see that my newest KDE is 3.5.10. That's what I'm using. Sometime this year I'll try KDE4 again.-- When I upgraded to FreeBSD 8.0 about a month ago I let sysinstall put KDE4 on me. Big mistake [1]. I disliked it intensely and, after a few days trying to come to terms with it, I reverted back to 3.5.10. YMMV but for me it was just too clumsy and bloated with a lot of new superfluous eye candy and lacked some simple and useful features that I'd become accustomed to. Given time perhaps I could have configured it to my liking but I couldn't see it offering anything useful that I didn't already have with 3.5 so it didn't seem worth the effort of continuing with it. [1] I suspect that my badly managed effort of deinstalling all of KDE4 and installing KDE3 was the main cause of the problems described in my recent thread Problems building en-openoffice.org-GB-3.1.1 from ports http://lists.freebsd.org/pipermail/freebsd-questions/2010-January/210421.html which resulted in me having to remove and reinstall all my ports. -- Mike Clarke ___ 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: Dislike the way port conflicts are handled now
Greg Larkin píše v so 16. 01. 2010 v 18:02 -0500: Here is the original post: http://www.mail-archive.com/freebsd-questions@freebsd.org/msg227363.html I will agree that `portupgrade -o` is way too useful feature. I'd vote for reverting to the old behaviour. I thought portmgr might have some insight into additional reasons for making the change, such as fixing a problem with pointyhat builds, etc. At the moment, I'm neutral on the change, since it hasn't caused me any grief, but I did some research for the folks who posted the original questions. It was done because someone thought it is a good idea and submitted a PR about it. -- Pav Lucistnik p...@oook.cz p...@freebsd.org I can't do that, that would make sense. signature.asc Description: Toto je digitálně podepsaná část zprávy
Re: changing place of .core files
On Sat, Jan 16, 2010 at 11:23:52PM +0100, Marco Beishuizen typed: Normally when a program crashes, it places a .core file in the homefilesystem. Is there a way of changing the filesystem where FreeBSD places it's core dumps? man core 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: Dislike the way port conflicts are handled now
On Sun, 17 Jan 2010 11:44:05 +0100 Pav Lucistnik p...@freebsd.org wrote: Greg Larkin píše v so 16. 01. 2010 v 18:02 -0500: Here is the original post: http://www.mail-archive.com/freebsd-questions@freebsd.org/msg227363.html I will agree that `portupgrade -o` is way too useful feature. I'd vote for reverting to the old behaviour. I thought portmgr might have some insight into additional reasons for making the change, such as fixing a problem with pointyhat builds, etc. At the moment, I'm neutral on the change, since it hasn't caused me any grief, but I did some research for the folks who posted the original questions. It was done because someone thought it is a good idea and submitted a PR about it. Howdy, For some ports is the conflict check too late see example here. http://lists.freebsd.org/pipermail/freebsd-gecko/2009-December/000577.html I agree that we need a new pre-fetch hook in bsd.port.mk if a conflict present is. But that need a bit work and it is on my todo list... - Martin ___ 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: To jail, or not to jail?
On Sat, Jan 16, 2010 at 06:21:59PM -0600, Kirk Strauser typed: I've been having fun playing with jails on my home server. There's one for databases, one for a webserver, another for using as a play shell server, etc. We use jails heavily at work for encapsulating services, and I can make a pretty good argument there for doing so. In general, though, do you see jails as particularly important or useful when not in a hosting environment where you're giving root access to an untrusted party? How far do you go toward segregating services? Theoretically, you could have a jail per daemon, but it seems like down that path lies madness. Not long ago, I've setup some development servers with ezjail where different developers can each rapidly create standard jailed environments and do their dev and test work there, and discard them when they're finished. Next to hosting, I believe this is another environment where jailing is a great advantage. 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: (SOLVED) Re: installing FreeBSD 8 on SSDs and UFS2 - partition alignment, block sizes, what does one need to know?
On Fri, 15 Jan 2010 17:57:03 +0100, Dan Naumov dan.nau...@gmail.com wrote: On Fri, Jan 15, 2010 at 6:38 PM, Rick Macklem rmack...@uoguelph.ca wrote: On Tue, 12 Jan 2010, Dan Naumov wrote: For my upcoming storage system, the OS install is going to be on a 80gb Intel SSD disk and for various reasons, I am now pretty convinced to stick with UFS2 for the root partition (the actual data pool will be ZFS using traditional SATA disks). I am probably going to use GPT partitioning and have the SSD host the swap, boot, root and a few other partitions. What do I need to know in regards to partition alignment and filesystem block sizes to get the best performance out of the Intel SSDs? I can't help with your question, but I thought I'd mention that there was a recent post (on freebsd-current, I think?) w.r.t. using an SSD for the ZFS log file. It suggested that that helped with ZFS perf., so you might want to look for the message. rick I have managed to figure out the essential things to know by know, I just wish there was a single, easy to grasp webpage or HOWTO describing and whys and hows so I wouldn't have had had to spend the entire day googling things to get a proper grasp on the issue :) Maybe you can copy-paste your e-mail in a wiki somewhere. And your wish has come true for other peoples. Ronald. To (perhaps a bit too much) simplify things, if you are using an SSD with FreeeBSD, you: 1) Should use GPT 2) Should create the freebsd-boot partition as normal (to ensure compatibility with some funky BIOSes) 3) All additional partitions should be aligned, meaning that their boundaries should be dividable by 1024kb (that's 2048 logical blocks in gpart). Ie, having created your freeebsd-boot, your next partition should start at block 2048 and the partition size should be dividable by 2048 blocks. This applies to ALL further partitions added to the disk, so you WILL end up having some empty space between them, but a few MBs worth of space will be lost at most. P.S: My oversimplification was in that MOST SSDs will be just fine with a 512 kb / 1024 block alignment. However, _ALL_ SSDs will be fine with 1024 kb / 2048 block alignment. - Sincerely, Dan Naumov ___ freebsd...@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-fs To unsubscribe, send any mail to freebsd-fs-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: Sound (micro-)interrupts with 8.0 stable/snd_hda/mplayer/vlc
On Sun, Jan 17, 2010 at 1:03 AM, Pieter de Goeje pie...@degoeje.nl wrote: Thanks for your reply, Try increasing the hw.snd.latency sysctl: Going from 5 to 10 doesn't change anything (actually, it seems worse on the file I tried). So the mystery still stands... Note that the micro-interrupts don't occur always at the same timestamp in the file which is playing. If I play one, let's say 3 times in a row, sound may drop around the same moment each time but not necessary... Just thinking out loud here, but maybe you have some non-standard HZ configured or powerd configured to clock the CPU back by an extreme amount, both could theoretically cause buffer underruns. I'm not quite sure I understand what you're thinking of. Anyway, I haven't changed any defaults : % cat /boot/loader.conf #zfs zfs_load=YES vfs.root.mountfrom=zfs:zroot # nividia nvidia_load=YES # sound snd_hda_load=YES hw.snd.default_unit=0 # k3b atapicam_load=YES hw.ata.atapi_dma=1 -- Thomas. ___ 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: Dislike the way port conflicts are handled now
Ion-Mihai Tetcu wrote: I'd be very happy if I could: - fetch the distfiles, even if I have a conflicting port installed - be able to use portmaster -o to switch from one port to an other one that conflicts with it. - be able to at least compile a port (eg. for testing) without having to de-install the current one. I'm all in favor of restoring the old behavior with a switch available to turn on the new one. +1 Although a big fat warning message at fetch or build phase when operating on a port with conflicts wouldn't go amiss. Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate Kent, CT11 9PW signature.asc Description: OpenPGP digital signature
Re: Dislike the way port conflicts are handled now
On 1/17/10, Martin Wilke m...@freebsd.org wrote: On Sun, 17 Jan 2010 11:44:05 +0100 Pav Lucistnik p...@freebsd.org wrote: Greg Larkin píše v so 16. 01. 2010 v 18:02 -0500: I will agree that `portupgrade -o` is way too useful feature. I'd vote for reverting to the old behaviour. portupgrade and other tools can easily be patched to work with the new behavior, by defining DISABLE_CONFLICTS for the targets preceding installation. Since the new behavior is generally more efficient, and safer, and since the people who will need to defer the check for some reason are in the minority, I vote that we keep the new behavior, and offer a chance to opt out of it with something like the attached patch. I didn't add any extra warnings, since I assumed that those who choose to defer the checks already know that this may lead to problems in some cases. b. I thought portmgr might have some insight into additional reasons for making the change, such as fixing a problem with pointyhat builds, etc. At the moment, I'm neutral on the change, since it hasn't caused me any grief, but I did some research for the folks who posted the original questions. It was done because someone thought it is a good idea and submitted a PR about it. Howdy, For some ports is the conflict check too late see example here. http://lists.freebsd.org/pipermail/freebsd-gecko/2009-December/000577.html I agree that we need a new pre-fetch hook in bsd.port.mk if a conflict present is. But that need a bit work and it is on my todo list... - Martin --- bsd.port.mk.orig2010-01-17 09:46:09.0 -0500 +++ bsd.port.mk 2010-01-17 10:36:02.0 -0500 @@ -541,6 +541,10 @@ #pattern meta-characters *, ?, [, ], and !. #Example: apache*-1.2* apache*-1.3.[012345] apache-*+ssl_* # +# LATE_CONFLICTS - If set, this port will defer the check for conflicts until immediately +# before the install target, to allow conflicting ports to be fetched and built. +# This may expose build errors due to the presence of conflicting ports. +# # Various directory definitions and variables to control them. # You rarely need to redefine any of these except WRKSRC and NO_WRKSUBDIR. # @@ -4253,9 +4257,17 @@ .else _CHROOT_SEQ= .endif +.if defined(LATE_CONFLICTS) +_EARLY_CONFLICT_CHECK= +_LATE_CONFLICT_CHECK= check-conflicts +.else +_EARLY_CONFLICT_CHECK= check-conflicts +_LATE_CONFLICT_CHECK= +.endif + _SANITY_SEQ= ${_CHROOT_SEQ} pre-everything check-makefile \ check-categories check-makevars check-desktop-entries \ - check-conflicts check-depends check-deprecated \ + ${_EARLY_CONFLICT_CHECK} check-depends check-deprecated \ check-vulnerable buildanyway-message options-message _FETCH_DEP=check-sanity _FETCH_SEQ=fetch-depends pre-fetch pre-fetch-script \ @@ -4275,8 +4287,8 @@ _BUILD_SEQ=build-message pre-build pre-build-script do-build \ post-build post-build-script _INSTALL_DEP= build -_INSTALL_SEQ= install-message run-depends lib-depends apply-slist pre-install \ - pre-install-script generate-plist check-already-installed +_INSTALL_SEQ= install-message ${_LATE_CONFLICT_CHECK} run-depends lib-depends \ + apply-slist pre-install pre-install-script generate-plist check-already-installed _INSTALL_SUSEQ= check-umask install-mtree pre-su-install \ pre-su-install-script create-users-groups do-install \ install-desktop-entries post-install post-install-script \ ___ 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: Newbie gmirror questions
On Saturday 16 January 2010, Pieter de Goeje wrote: On Saturday 16 January 2010 00:34:52 Mike Clarke wrote: I'm about to upgrade to more disk space and I'm tempted use this as an opportunity to get two disks and implement gmirror. Before I go ahead there's a few aspects of mirroring I'm not sure about and would appreciate some advice. I'm using grub for multi booting. Does this introduce any problems if I want to boot into Windows or Linux on one of the other partitions? Gmirror stores the metadata at the last sector of each disk. So this shouldn't be a problem. But other operating systems might overwrite this data if you're not careful during the paritioning. I'll make sure that the last stripe on the disk isn't used by any alien OS then. Actually I was more concerned about what happens when I boot into another OS like Windows or Linux on one of the spare slices - I'm assuming that I have to apply gmirror to the whole disk rather than just selected slices? My main reason for multibooting with grub is to have a spare slice where I can install a spare copy of FreeBSD. I find this very useful when I do any major upgrade (like trying out your suggestion of going to 8-STABLE) because I can copy the current system onto the spare slice and use that to apply the upgrades, if I hit any major problems I can easily revert to booting the original slice until I figure out how to fix the problem. I'm assuming that using gmirror won't prevent me from doing this. If I boot into an OS which isn't aware of gmirror, such as Windows, then I assume it will just run normally if I point grub to the appropriate slice on the primary drive. Next time I boot into FreeBSD then I expect gmirror will recognise that the second drive is out of sync with the primary and update it in the background. Perhaps this might hit performance for a while but on the other hand it provides me with a certain amount of backup if the Windows system trashes itself because I could try to restore it from the copy on the second drive before attempting to reboot FreeBSD. I assume the same logic would also apply to running Linux on one of the slices, although Linux has software mirror capability it appears to be totally different from gmirror so I expect it's a case of running that non-mirrored too. If this approach isn't wise then I expect I'll need to keep a spare non-mirrored disk for the other systems. I don't expect to need to boot into Windows or Linux very often. Now that I've upgraded from FreeBSD 6.4 to 8.0 I'm able to make use of virtualbox for this sort of thing which is generally much more convenient but I'd like to keep the ability to run them natively should the need arise. -- Mike Clarke ___ 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: Newbie gmirror questions
Mike Clarke wrote: Actually I was more concerned about what happens when I boot into another OS like Windows or Linux on one of the spare slices - I'm assuming that I have to apply gmirror to the whole disk rather than just selected slices? You can't do this. gmirror is FreeBSD specific, and other OSes can't deal with it. You can take your two drives, partition them (fdisk) and then create a gmirror across the slices you assign to FreeBSD. Similarly you could set up md to mirror the slice(s) used for Linux. As far as I know, Windows doesn't come with OS level mirroring software -- it can use hostraid[*], or I believe there are some commercial solutions you can purchase. Or just treat your Windows partitions as two separate drives, and live without resilience for that OS. As far as booting the system goes, Grub should be able to boot each OS from either mirror as if it was a plain installation on a single drive. Wilder suggestions would be to install Linux, Open Solaris or NetBSD as a Xen dom0, and then install your other OSes as domU guests. In this case, you'ld mirror the storage within the dom0 instance and export a device to each of the client OSes. [Open Solaris particularly interesting for this purpose, as you could use ZFS.] This is substantially more complex to set up than your current plan, but does have the very handy advantage that you can run all of your OSes simultaneously. Cheers, Matthew [*] FreeBSD can use this too -- the disks appear as an ar device (see ata(4)) -- and presumably so can Linux, but I can't confirm that. Hostraid is generally second best to OS based RAIDs. Apart from anything else, you tend to have to bring the system down to the BIOS level to do anything to the RAIDs. -- Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate Kent, CT11 9PW signature.asc Description: OpenPGP digital signature
gmirror+gjournal: spontaneous reboots on excessive disk access
Hi -- I'm running a gmirror raid1 plus gjournal for a year now. This is a 7.2-RELEASE-p6 right now. Both disks are regular ATA and healthy according smartctl. Sometimes, not always though, I do experience spontaneous reboots without leaving any hints in logfiles whenver I beat my disks excessively. This might be something like: dd if=/dev/null of=/some/file bs=1M count=4k plus parallel disk accesses by mail and news server. If I omit all parallel disk access those dd's will run to completion without reboots, always. It might well be that there is something wrong with my hardware (co-located, no access to the console available). Thus, before addressing support I'd like to know: has anyone else seen reboots under those conditions? Regards, Michael -- to let ___ 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
Running PHP File under Crontab...
I am wanting to execute a PHP file 5 times a day via crontab. Is it possible? If so what is the proper crontab command for this? Thanks, Diego ___ 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: [PHP] RE: Clean PHP 5.2.12 Build Core Dumping / Can't Build Port - FreeBSD 6.1
I think Vasily Pupkin is right. http://www.freebsd.org/cgi/cvsweb.cgi/ports/Mk/bsd.port.mk.diff?r1=1.630;r2=1.631;f=h Found {portsdir}/Mk/bsd.port.mk and make sure the version is higher than 1.631(2009/12/18) In another side,your are use *default tag=. in your supfile or /etc/make.conf? http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/cvsup.html mybe you need to use *default tag=RELEASE_6_1_0 http://www.freebsd.org/cgi/cvsweb.cgi/ports/lang/php5/?only_with_tag=RELEASE_6_1_0 php5.x for freebsd 6.1 2010/1/16 Vasily Pupkin poopk...@mail.ru: add X11BASE=${LOCALBASE} as it is shown below: #echo X11BASE=${LOCALBASE} /etc/make.conf The problem is in recent changeset for ports/Mk/bsd.port.mk: (http://www.freebsd.org/cgi/cvsweb.cgi/ports/Mk/bsd.port.mk.diff?r1=1.630;r2=1.631;f=h) ..if ${X11BASE} != ${LOCALBASE} ..BEGIN: @${ECHO_MSG} X11BASE is now deprecated. Unset X11BASE in make.conf and try again. @${FALSE} ..endif The guy commited the revision couldn't imagine that there is no X11BASE on system defined at all while LOCALBASE is defined. This bug should be fixed soon because a lot of people will stuck with it after ports upgrade. === I try a 'make all-depend-list' the error shows up = which error show ? # make X11BASE is now deprecated. Unset X11BASE in make.conf and try again. *** Error code 1 Stop. That's the error... happens every time, no matter what I try to set/unset in /etc/make.conf. I looked through the makefiles to see where X11BASE is referenced and I can't find any place where it is to just kill it. This is _exactly_ what I did, and as soon as I try a 'make all- depend-list' the error shows up. I don't even have the X11 system installed (it's a headless server, with no GUI). This is on a CLEAN 6.1 install, without any upgrades/patches, just straight off the ISO install and after a portsnap install/extract. I tried building it _before_ I updated the ports and it would build a 5.1.2 php ok, but I need 5.2.12. Something has changed in the port between 5.1.2 and 5.2.12 1.add WITHOUT_X11=yes in /etc/make.conf 2.remove X11BASE= from that file and 4.make all-depend-list 5.make clean all depend soft 6.make menuconfig set X11 disable 7.make make install 2010/1/12 Don O'Neil li...@lizardhill.com: Ok.. just for grins I installed a new instance of 6.1, NO Patches, just straight off the ISO... I loaded the ports that came WITH the distro, and was able to make php 5.1.2 ok... When I did a portsnap fetch, portsnap extract, then went into the /usr/ports/lang/php5 and just typed make I get the same error... SO as it seems, the port is broken, at least for working with FreeBSD 6.1. Can anyone give me some hints on how to build this sucker by hand? Seems as though there are a bunch of patches that are referenced in the distinfo file. I REALLY need to get this taken care of asap, any help is appreciated. Thanks! I tried adding WITHOUT_X11=yes to /etc/make.conf as well as X11BASE= and X11BASE=, but I still get the same error. Remove them. This makes sure they are not defined, not even empty (as in #define BLA - symbol 'BLA' is defined). Where to go from here? Do I have and old version of something that is causing this? I get this error _right away_ before anything is even built. It seems to be a check by the Makefile at port's top level. Ok... I have no definition for X11BASE anywhere, not in my env, not in my /etc/make.conf, nowhwere... However, it's still complaining about X11BASE being deprecated. I tried just adding WITHOUT_X11=yes in /etc/make, and without it. I even searched all the Makefiles in /usr/ports, and in the /usr/ports/lang/php5 dir to find any reference to X11, or X, or X11BASE, but nada... I don't even know where this error message is being generated from. I can't even do a basic make without it immediately spitting out the error: # make X11BASE is now deprecated. Unset X11BASE in make.conf and try again. *** Error code 1 Stop. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php ___ 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: Running PHP File under Crontab...
On Jan 17, 2010, at 1:28 PM, Diego Montalvo wrote: I am wanting to execute a PHP file 5 times a day via crontab. Is it possible? If so what is the proper crontab command for this? Thanks, Diego Diego, Certainly, but you must ensure that you have the CLI version of PHP installed. Regards, Mikel King CEO, Olivent Technologies Senior Editor, BSD News Network Columnist, BSD Magazine 6 Alpine Court, Medford, NY 11763 o: 631.627.3055 c: 631.796.1499 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: Running PHP File under Crontab...
CLI meaning, if I can run and excute ?php echo 'hello world';? in command line, a php file can run in crontab? doing the following in shell: # php helloworld.php - hello world is produced... Thanks! 2010/1/17 mikel king mikel.k...@olivent.com: On Jan 17, 2010, at 1:28 PM, Diego Montalvo wrote: I am wanting to execute a PHP file 5 times a day via crontab. Is it possible? If so what is the proper crontab command for this? Thanks, Diego Diego, Certainly, but you must ensure that you have the CLI version of PHP installed. Regards, Mikel King CEO, Olivent Technologies Senior Editor, BSD News Network Columnist, BSD Magazine 6 Alpine Court, Medford, NY 11763 o: 631.627.3055 c: 631.796.1499 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: Running PHP File under Crontab...
I am using ?php #!/bin/sh ? 2010/1/17 mikel king mikel.k...@olivent.com: On Jan 17, 2010, at 2:30 PM, Diego Montalvo wrote: CLI meaning, if I can run and excute ?php echo 'hello world';? in command line, a php file can run in crontab? doing the following in shell: # php helloworld.php - hello world is produced... Thanks! ok then do you have #!/usr/local/bin/php as your first line of the script? Or are you using the bash exec command to run the code in your shell script? Also you can try placing the path to the php CLI executable in the crontab. ___ 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: Running PHP File under Crontab...
I am wanting to execute a PHP file 5 times a day via crontab. Is it possible? If so what is the proper crontab command for this? Hi. I'm running several PHP programs via cron. #1 Make sure you have CLI (command line interface) in your PHP port: As root, cd /usr/ports/lang/php5 make config Then make sure the CLI is set to on. If it isn't, change it, and recompile the port. For example portupgrade -f php5-5.2.12 will recompile the port, if you have portupgrade installed. #2 Write the PHP script you want to run. There are different syntaxes for writing a command-line PHP program but here is one of them: ?php // Your PHP code here ? Save this to a path /path/to/mycode.php. #3 Add cron job to execute this program. Your crontab should look like this: */5 * * * * /usr/local/bin/php -f /path/to/mycode.php (That would execute your PHP script every 5 minutes for example.) That's it! There is an alternate way to write PHP scripts for CLI, but I have not used it extensively, so I don't know all the details or the correctest way to do it. You can write a script like this: #!/usr/local/bin/php ?php echo Hello!\n; ? And then save it to a file for example test.php and set the executable permission on it. Then you can just: ./test.php from a terminal. So you could change the cron to just execute the script directly in this case instead of explicitly calling /usr/local/bin/php in the crontab. ___ 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: Running PHP File under Crontab...
On Jan 17, 2010, at 3:01 PM, Diego Montalvo wrote: I am using ?php #!/bin/sh ? 2010/1/17 mikel king mikel.k...@olivent.com: On Jan 17, 2010, at 2:30 PM, Diego Montalvo wrote: CLI meaning, if I can run and excute ?php echo 'hello world';? in command line, a php file can run in crontab? doing the following in shell: # php helloworld.php - hello world is produced... Thanks! ok then do you have #!/usr/local/bin/php as your first line of the script? Or are you using the bash exec command to run the code in your shell script? Also you can try placing the path to the php CLI executable in the crontab. If your php executable is in /usr/local/bin then replace /bin/sh with that in your script file. #!/usr/local/bin/php ?php echo Hello cruel world!!!\n; ? Remember to chmod +x the script file. m! ___ 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: Dislike the way port conflicts are handled now
On Sun, 17 Jan 2010, Matthew Seaman wrote: Ion-Mihai Tetcu wrote: I'd be very happy if I could: - fetch the distfiles, even if I have a conflicting port installed - be able to use portmaster -o to switch from one port to an other one that conflicts with it. - be able to at least compile a port (eg. for testing) without having to de-install the current one. I'm all in favor of restoring the old behavior with a switch available to turn on the new one. +1 Although a big fat warning message at fetch or build phase when operating on a port with conflicts wouldn't go amiss. Agreed. A warning would give time to interrupt a big distfile fetch or build without taking that option away by default, or encouraging disabling conflict checks altogether. -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: Dislike the way port conflicts are handled now
In the last episode (Jan 17), Martin Wilke said: On Sun, 17 Jan 2010 11:44:05 +0100 Pav Lucistnik p...@freebsd.org wrote: Greg Larkin píse v so 16. 01. 2010 v 18:02 -0500: Here is the original post: http://www.mail-archive.com/freebsd-questions@freebsd.org/msg227363.html I will agree that `portupgrade -o` is way too useful feature. I'd vote for reverting to the old behaviour. I thought portmgr might have some insight into additional reasons for making the change, such as fixing a problem with pointyhat builds, etc. At the moment, I'm neutral on the change, since it hasn't caused me any grief, but I did some research for the folks who posted the original questions. It was done because someone thought it is a good idea and submitted a PR about it. For some ports is the conflict check too late see example here. http://lists.freebsd.org/pipermail/freebsd-gecko/2009-December/000577.html I agree that we need a new pre-fetch hook in bsd.port.mk if a conflict present is. But that need a bit work and it is on my todo list... Maybe CONFLICTS could be treated like DEPENDS, with separate BUILD and RUN checks. -- 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: Running PHP File under Crontab...
One other question, is there a way to copy the ouput of the crontab php file to another file? Simply the hello world output and not the ?php? code... ?? 2010/1/17 mikel king mikel.k...@olivent.com: On Jan 17, 2010, at 3:01 PM, Diego Montalvo wrote: I am using ?php #!/bin/sh ? 2010/1/17 mikel king mikel.k...@olivent.com: On Jan 17, 2010, at 2:30 PM, Diego Montalvo wrote: CLI meaning, if I can run and excute ?php echo 'hello world';? in command line, a php file can run in crontab? doing the following in shell: # php helloworld.php - hello world is produced... Thanks! ok then do you have #!/usr/local/bin/php as your first line of the script? Or are you using the bash exec command to run the code in your shell script? Also you can try placing the path to the php CLI executable in the crontab. If your php executable is in /usr/local/bin then replace /bin/sh with that in your script file. #!/usr/local/bin/php ?php echo Hello cruel world!!!\n; ? Remember to chmod +x the script file. m! ___ 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: Newbie gmirror questions
On Sunday 17 January 2010, Matthew Seaman wrote: Mike Clarke wrote: Actually I was more concerned about what happens when I boot into another OS like Windows or Linux on one of the spare slices - I'm assuming that I have to apply gmirror to the whole disk rather than just selected slices? You can't do this. gmirror is FreeBSD specific, and other OSes can't deal with it. You can take your two drives, partition them (fdisk) and then create a gmirror across the slices you assign to FreeBSD. This will make things a lot easier for me. I think all the examples of gmirror I've seen used things like /dev/da0 as the provider in label commands so I assumed that I had to use the whole physical disk but if I can mirror individual slices then I have much more flexibility. My motherboard has a UDMA133 controller for ata0 ata1 (which I don't use) and 2 SATA controllers for ata2 to ata5 so with my 2 SATA drives spread between the controllers on channels 2 4 I could have something like /dev/mirror/gm1 provided by /dev/ad2s1 /dev/ad4s1 and /dev/mirror/gm2 provided by /dev/ad2s2 /dev/ad4s2 for a couple of FreeBSD systems. That will leave me with 2 spare slices on each drive for other purposes. Any Windows or Linux stuff I put on tends to be mainly experimental and less long term than my FreeBSD system so don't really need the resilience of being mirrored. -- Mike Clarke ___ 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 viewing DVDs
hello, world\n I'm trying to view a Friends DVD (original) on my 8-Current system but none of the dvd viewer apps (eg. ogle and mplayer) work. Investigating I found that I can mount the DVD as a cd9660 file system, but all the *.vob files result in an I/O error when read, while all the non-vobs can be read just fine: /cdrom/video_ts # ls -l total 3841434 -r-xr-xr-x 1 root wheel 12288 Dec 21 2004 video_ts.bup -r-xr-xr-x 1 root wheel 12288 Dec 21 2004 video_ts.ifo -r-xr-xr-x 1 root wheel 3016704 Dec 21 2004 video_ts.vob -r-xr-xr-x 1 root wheel 90112 Dec 21 2004 vts_01_0.bup -r-xr-xr-x 1 root wheel 90112 Dec 21 2004 vts_01_0.ifo -r-xr-xr-x 1 root wheel 7192576 Dec 21 2004 vts_01_0.vob -r-xr-xr-x 1 root wheel 1073739776 Dec 21 2004 vts_01_1.vob -r-xr-xr-x 1 root wheel 1073739776 Dec 21 2004 vts_01_2.vob -r-xr-xr-x 1 root wheel 1073739776 Dec 21 2004 vts_01_3.vob -r-xr-xr-x 1 root wheel 701995008 Dec 21 2004 vts_01_4.vob /cdrom/video_ts # md5 * MD5 (video_ts.bup) = 7c22ee5d3160bc66158b13033ab3f87b MD5 (video_ts.ifo) = 7c22ee5d3160bc66158b13033ab3f87b md5: video_ts.vob: Input/output error MD5 (vts_01_0.bup) = 21acaafc3988d8a296881c878865a7d1 MD5 (vts_01_0.ifo) = 21acaafc3988d8a296881c878865a7d1 md5: vts_01_0.vob: Input/output error md5: vts_01_1.vob: Input/output error md5: vts_01_2.vob: Input/output error md5: vts_01_3.vob: Input/output error md5: vts_01_4.vob: Input/output error and for each file dmesg says acd0: FAILURE - READ_BIG ILLEGAL REQUEST asc=0x6f ascq=0x03 g_vfs_done():acd0[READ(offset=5834752, length=65536)]error = 5 Is this a case of some kind of DRM protection I'm seeing here? Am I missing something else? The drive is a acd0: DVDR HL-DT-ST DVDRAM GH22LS50/TL00 at ata8-master SATA150 (LG GH22) on a Asus P5Q3 Deluxe with Intel P45/ICH10R chipset. Regards, Jens -- Jens Schweikhardt http://www.schweikhardt.net/ SIGSIG -- signature too long (core dumped) ___ 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: Newbie gmirror questions
Mike Clarke wrote: On Sunday 17 January 2010, Matthew Seaman wrote: Mike Clarke wrote: Actually I was more concerned about what happens when I boot into another OS like Windows or Linux on one of the spare slices - I'm assuming that I have to apply gmirror to the whole disk rather than just selected slices? You can't do this. gmirror is FreeBSD specific, and other OSes can't deal with it. You can take your two drives, partition them (fdisk) and then create a gmirror across the slices you assign to FreeBSD. This will make things a lot easier for me. I think all the examples of gmirror I've seen used things like /dev/da0 as the provider in label commands so I assumed that I had to use the whole physical disk but if I can mirror individual slices then I have much more flexibility. My motherboard has a UDMA133 controller for ata0 ata1 (which I don't use) and 2 SATA controllers for ata2 to ata5 so with my 2 SATA drives spread between the controllers on channels 2 4 I could have something like /dev/mirror/gm1 provided by /dev/ad2s1 /dev/ad4s1 and /dev/mirror/gm2 provided by /dev/ad2s2 /dev/ad4s2 for a couple of FreeBSD systems. That will leave me with 2 spare slices on each drive for other purposes. Any Windows or Linux stuff I put on tends to be mainly experimental and less long term than my FreeBSD system so don't really need the resilience of being mirrored. Yes -- there's an On-Lamp article by Dru Lavigne that has been particularly influential, and gmirror'ing whole disks is the best way forwards for the vast majority of cases where you've a server dedicated to one OS. However, one of the really amazingly brilliant things about geom is that just about any disk / storage related thing can be a geom provider, and geom constructs will nest very happily. Here's a howto for setting up gmirror across a pair of slices: http://people.freebsd.org/~rse/mirror/ It's fairly old now, but the essentials are still correct. The one thing that has changed in the intervening time is what is the best algorithm to use for the gmirror. Up until the release of 8.0, 'round-robin' was virtually always the right choice, but nowadays 'load' is preferred. All that means, is change the following line in rse's article from: gmirror label -v -n -b round-robin ${gm} /dev/${d2}s1 to gmirror label -v -n -b load ${gm} /dev/${d2}s1 Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate Kent, CT11 9PW signature.asc Description: OpenPGP digital signature
Re: Newbie gmirror questions
On 17.01.2010 19:18, Matthew Seaman wrote: Mike Clarke wrote: Actually I was more concerned about what happens when I boot into another OS like Windows or Linux on one of the spare slices - I'm assuming that I have to apply gmirror to the whole disk rather than just selected slices? You can't do this. gmirror is FreeBSD specific, and other OSes can't deal with it. You can take your two drives, partition them (fdisk) and then create a gmirror across the slices you assign to FreeBSD. Similarly you could set up md to mirror the slice(s) used for Linux. As far as I know, Windows doesn't come with OS level mirroring software -- it can use hostraid[*], or I believe there are some commercial solutions you can purchase. Or just treat your Windows partitions as two separate drives, and live without resilience for that OS. I can correct you here. XP Pro and later do know about 'dynamic' disks and they can make mirrors from them. Booting from such disks is a kind pain in the ass but it works for RAID0, RAID1, RAID0+1 and RAID5 setup. I can be wrong, I'm not a Win-fan, I just do know this exists. You can find details here: http://support.microsoft.com/default.aspx/kb/816307 -- Sphinx of black quartz judge my vow. ___ 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: Running PHP File under Crontab...
There are a couple of ways. My prefrence is to control the output directly from the app in PHP. However you should be able to pipe the output to a file without issue. Cheers, m! On Jan 17, 2010, at 15:48, Diego Montalvo dmonta...@gmail.com wrote: One other question, is there a way to copy the ouput of the crontab php file to another file? Simply the hello world output and not the ?php? code... ?? 2010/1/17 mikel king mikel.k...@olivent.com: On Jan 17, 2010, at 3:01 PM, Diego Montalvo wrote: I am using ?php #!/bin/sh ? 2010/1/17 mikel king mikel.k...@olivent.com: On Jan 17, 2010, at 2:30 PM, Diego Montalvo wrote: CLI meaning, if I can run and excute ?php echo 'hello world';? in command line, a php file can run in crontab? doing the following in shell: # php helloworld.php - hello world is produced... Thanks! ok then do you have #!/usr/local/bin/php as your first line of the script? Or are you using the bash exec command to run the code in your shell script? Also you can try placing the path to the php CLI executable in the crontab. If your php executable is in /usr/local/bin then replace /bin/sh with that in your script file. #!/usr/local/bin/php ?php echo Hello cruel world!!!\n; ? Remember to chmod +x the script file. m! ___ 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: OOo question.....
On Sun, Jan 17, 2010 at 10:41:16AM +, Mike Clarke wrote: On Sunday 17 January 2010, Gary Kline wrote: On Sat, Jan 16, 2010 at 10:27:59AM +, Mike Clarke wrote: On Saturday 16 January 2010, Gary Kline wrote: [snip] Second q is howto use them for my desktop backgrounds in KDE since, upon rebuild and relaunch, everything is black. the first question is howto save a separate image? or are there other tools to do this? [neither xv nor gv work] Right click on a blank piece of the KDE desktop and select Configure Desktop. This should open with the Change the background settings icon highlighted. In the Background section click the Picture radio button and click the folder icon on the right to browse to your selected image. (Several hours later). I found the place and added three 'wallpapers'; they haven't appeared. Probably will after I've rebooted. The new wallpaper should appear immediately after you click on OK or Apply. hmmm. nope, nada. I can work without pretty pix on my workspaces :-) ---I see that my newest KDE is 3.5.10. That's what I'm using. Sometime this year I'll try KDE4 again.-- When I upgraded to FreeBSD 8.0 about a month ago I let sysinstall put KDE4 on me. Big mistake [1]. I disliked it intensely and, after a few days trying to come to terms with it, I reverted back to 3.5.10. YMMV but for me it was just too clumsy and bloated with a lot of new superfluous eye candy and lacked some simple and useful features that I'd become accustomed to. Given time perhaps I could have configured it to my liking but I couldn't see it offering anything useful that I didn't already have with 3.5 so it didn't seem worth the effort of continuing with it. [1] I suspect that my badly managed effort of deinstalling all of KDE4 and installing KDE3 was the main cause of the problems described in my recent thread Problems building en-openoffice.org-GB-3.1.1 from ports http://lists.freebsd.org/pipermail/freebsd-questions/2010-January/210421.html which resulted in me having to remove and reinstall all my ports. Thanks for your input. I had similar problems with rel 4; plus some things simply quit working. I'll hold off awhile yet. -- Mike Clarke -- Gary Kline kl...@thought.org http://www.thought.org Public Service Unix http://jottings.thought.org http://transfinite.thought.org The 7.79a release of Jottings: http://jottings.thought.org/index.php ___ 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 viewing DVDs
On Sun, Jan 17, 2010 at 10:13:55PM +0100, Jens Schweikhardt wrote: hello, world\n Hi Jens, I'm trying to view a Friends DVD (original) on my 8-Current system but none of the dvd viewer apps (eg. ogle and mplayer) work. Investigating I found that I can mount the DVD as a cd9660 file system, but all the *.vob files result in an I/O error when read, while all the non-vobs can be read just fine: /cdrom/video_ts # ls -l total 3841434 -r-xr-xr-x 1 root wheel 12288 Dec 21 2004 video_ts.bup -r-xr-xr-x 1 root wheel 12288 Dec 21 2004 video_ts.ifo -r-xr-xr-x 1 root wheel 3016704 Dec 21 2004 video_ts.vob -r-xr-xr-x 1 root wheel 90112 Dec 21 2004 vts_01_0.bup -r-xr-xr-x 1 root wheel 90112 Dec 21 2004 vts_01_0.ifo -r-xr-xr-x 1 root wheel 7192576 Dec 21 2004 vts_01_0.vob -r-xr-xr-x 1 root wheel 1073739776 Dec 21 2004 vts_01_1.vob -r-xr-xr-x 1 root wheel 1073739776 Dec 21 2004 vts_01_2.vob -r-xr-xr-x 1 root wheel 1073739776 Dec 21 2004 vts_01_3.vob -r-xr-xr-x 1 root wheel 701995008 Dec 21 2004 vts_01_4.vob /cdrom/video_ts # md5 * MD5 (video_ts.bup) = 7c22ee5d3160bc66158b13033ab3f87b MD5 (video_ts.ifo) = 7c22ee5d3160bc66158b13033ab3f87b md5: video_ts.vob: Input/output error MD5 (vts_01_0.bup) = 21acaafc3988d8a296881c878865a7d1 MD5 (vts_01_0.ifo) = 21acaafc3988d8a296881c878865a7d1 md5: vts_01_0.vob: Input/output error md5: vts_01_1.vob: Input/output error md5: vts_01_2.vob: Input/output error md5: vts_01_3.vob: Input/output error md5: vts_01_4.vob: Input/output error and for each file dmesg says acd0: FAILURE - READ_BIG ILLEGAL REQUEST asc=0x6f ascq=0x03 g_vfs_done():acd0[READ(offset=5834752, length=65536)]error = 5 Is this a case of some kind of DRM protection I'm seeing here? Am I missing something else? The drive is a acd0: DVDR HL-DT-ST DVDRAM GH22LS50/TL00 at ata8-master SATA150 (LG GH22) on a Asus P5Q3 Deluxe with Intel P45/ICH10R chipset. this usually happens with CSS scrambled VOBs. Have you tried to extract the VOBs with sysutils/vobcopy (e.g. using its --mirror option)? Just make sure that multimedia/libdvdread is actually compiled with multimedia/libdvdcss as a dependency, before compiling vobcopy. The ports should take care of that though. You may still see acd failures in dmesg using vobcopy (no idea why), but the copied VOBs should still be okay. I have no problems viewing them with mplayer. Regards, Jens -- Jens Schweikhardt http://www.schweikhardt.net/ SIGSIG -- signature too long (core dumped) Good luck, -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
curses init in one line?
this is going to sound a bit off the wall, and it may have only worked in FBSD [if I wasn't imagining it], but is there a way to get into curses/ncurses mode in one short line? it has been years but I think somebody sent me the magic code, for either a shell scrippt or a C program. I do not have it anywhere in my C files. gary PS: no, I am not sloshed [*hic*] -- Gary Kline kl...@thought.org http://www.thought.org Public Service Unix http://jottings.thought.org http://transfinite.thought.org The 7.79a release of Jottings: http://jottings.thought.org/index.php ___ 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