Re: /sbin/reboot: symbolic link to `halt'
On Sun, Aug 16, 2009 at 9:22 PM, Sven Joachim wrote: > On 2009-08-16 22:36 +0200, Chris Bannister wrote: > >> I noticed that /sbin/reboot is a symbolic link to /sbin/halt. How does >> the system "know" the difference? > > The program notices how it is called and behaves accordingly. Programs > written in C can get information about their name in argv[0]. Well, the parent process sets argv[0], just like it sets argv[1] and following. The idea that argv[0] should be the name with which the program was invoked is just a convention. It's not a commonly broken convention, though. Login shells are started with '-' as the first character of argv[0]. The only other example I can think of is that ldd used to call programs with argc==0 and argv[0]==NULL in order to get the dynamic linker to spit out the list of shared libraries. These days, this is done differrently and argv[0] is no longer special on Linux from that point of view. Not sure when the changeover happened, it could be the a.out->ELF switch. James. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Re: Ctrl+Ret in Terminals
On Wed, Jul 1, 2009 at 12:56 AM, Kumar Appaiah wrote: > Dear Debian Users, > > This is a generic question, not Debian-specific. > > One of my friends uses org-mode in GNU Emacs, and loves it. Now, the > issue is that one of the functions in org-mode is bound (by default) > to C-RET (Ctrl+Enter), which works fine on the X11 Emacs. I just tried this in GNU Emacs 22.2.1 and C-return is not bound to anything. Anyway, it's likely there is another keybinding for the command. You find such things like this: Press C-h k to find out what a random key does (by pressing it).Let's choose M-RET. Emacs says: runs the command org-meta-return which is an interactive compiled Lisp function in `org.el'. It is bound to . (org-meta-return &optional arg) So, now we could use "C-h w" to find out what else that is bound to, or use local-set-key to additionally bind that function to some other key too. James. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Re: find -ls
On Sun, Jun 28, 2009 at 6:52 AM, root wrote: > Is there any way other than modifying the source > to get "find -ls" to return the file date as "month day year" The M-D-Y ordering is dangerously ambiguous, and especially for that portion of the world that lives outside the USA. Consider using -MM-DD instead (it's unambiguous since it is the only representation that starts with four digits). > rather than "month day time" for all files? > TIA, > Mike > > > -- > To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org > with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org > > -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Re: What happened to network devices?
On Sat, May 30, 2009 at 5:30 PM, lee wrote: > On Fri, May 29, 2009 at 06:40:00PM -0500, Boyd Stephen Smith Jr. wrote: >> In <20090529225111.gf1...@cat.rubenette.is-a-geek.com>, lee wrote: >> >Anyway, I'd like to know what happened >> >to /dev/eth0. >> >> I've never had a Linux box where /dev/eth0 existed. That said, I'm only been >> using it as my main OS since the end of 2004. > > So what did you use instead? I have never had trouble with using > "eth0" or "/dev/eth0" before, so I didn't check if such a file > existed. A network interface is a device which I expect to be > represented under /dev. Not so, at least on Linux. Network interfaces are not represented as any kind of file (and specifically not as device special files) on Linux. For example, you cannot use open(2) or rename(2) on eth0. I've heard (mostly long ago, certainly before 1996) about Linux-based systems where interfaces also have nodes under /dev, but I've never heard of one where this is necessary. > Maybe the program I'm trying to try out is broken, but unless I can > specify a network interface, I can't tell. > > > -- > To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org > with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org > > -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Re: I can not set up postfix to send email through SSL-connection
On Tue, May 12, 2009 at 10:16 AM, Sthu Deus wrote: > Good day. > > I can not set up postfix to send email through SSL-connection (465). It > works for plain connection (on 25 port) only. > > If You have any suggestion on what could be a culprit, I would like to > know. I can provide any necessary information: logs and confs. > > Thank You for Your effort and time. See http://www.postfix.org/lists.html - but you could also search the web. James. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
HTPC cases/remotes - Linux support?
I plan to buy an HTPC case and muck about building a NAS and perhaps using it as a PVR/music player etc. Online shops are less than specific about which of their fancy HTPC cases work with Linux (I'm thinking specifically of www.komplett.ie). What have you guys found that worked? Did they include a remote control? Some of them also include a front-panel LED display or similar, but I get the impression that those frequently don't work with Linux either. What's your experience? In fact stepping back a bit, which online vendors sell HTPC stuff and are Linux-friendly? (I live in Dublin, so such an online vendor must be able to ship there; that probably means choosing a vendor in Ireland, the UK or the rest of Europe). Thanks, James. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Support for Logitech QuckCam S7500 in Lenny?
I looked for software to support the LogiTech QuckCam S7500 (a newish USB web camera) in Lenny. Plenty of stuff appeared to be relevant, but nothing actually seemed to work (for example, one piece of software turned out to be for parallel port driven cameras). With the popularity of Logitech hardware and the sheer number of Debian packages, I feel reasonably certain that I've missed the obvious answer. Does anybody else have it working? What packages did you require? Just how did you configure them?I've tried (or at least installed) the following packages: +gqcam 0.9.1-4 +luvcview 1:0.2.4-2 +ekiga-dbg 2.0.12-1+nmu1 +libexosip2-4 3.1.0-1 +liblinphone2 2.1.1-1+b1 +libmediastreamer0 2.1.1-1+b1 +libortp7 2.1.1-1+b1 +libosip2-3deb 3.1.0-1 +linphone 2.1.1-1+b1 +linphone-common 2.1.1-1 +linphone-nox 2.1.1-1+b1 +sip-tester 2.0.1-1.2 I can see the webcam in the output of lsusb, but no /dev/video node appears (and nothing in /sys/...), so I conclude that it's probably the kernel-level support which is missing, though I am not sure how to distinguish that from a HAL problem in this case. James. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Suggestions for multilevel backup of single machine?
Here's my current backup arrangement: Data is stored in filesystems on LVM volumes over RAID1. While RAID1 presents some protection from disk failure, it gives no protection against data corruption due to flaky hardware or data loss caused by fire or theft. Therefore I have an offsite backup arrangement. This consists of two rsync backups. One backup goes to a local disk (different disk manufacturer, different disk controller) and the other rsync backup is to a disk at work. This works a bit but the outgoing bandwidth on my cable connection is low (about 0.3 Mbps). If I make a large change to the machine (e.g. dist-upgrade) I physically swap the home and work backup disks (this is the main reason for keeping the local backup too). This at least allows me to place an upper limit on the amount of data I would lose in the case of (e.g.) a fire. However, there are two respects in which I think some improvement would be useful: (1) Quite a lot of the files on my system are files I never expect to change again. I plan to write a few scripts which will tell me if a file that hadn't been modified in, say, two years was in fact recently modified. This could give me early warning that the disk controller has gone berserk (again). (2) It would be useful to have a historic backup capability too (e.g. the way the filesystem looked yesterday, last week, last month and a year ago), at least for filesystems like /home. What are good solutions for doing (2)? (Please only recommend software you're using yourself :) Thanks, James. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Re: Advice on raid/lvm
On Wed, Apr 8, 2009 at 9:04 PM, Miles Fidelman wrote: > I'm currently in my third day of rebuilding a machine that had /boot and / > on an LVM volume on raided disks. After one drive died, I ended up in a > weird mode where LVM was mounting one of the component drives, rather than > the raid volume - with the long result being that I'm reinstalling the o/s > from scratch and hoping that my backups are good enough that I haven't lost > any user data. I had a similar experience a while back (an MD RAID1 set degraded and LVM just accepted one of the two mirrored drives as a PV), though I didn't need to reinstall and didn't lose any data. Still, this is certainly an area that could have worked better. James. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Re: slocate replacements
On Tue, Jan 27, 2009 at 4:07 PM, Johannes Wiedersich wrote: > Several implementations of locate exist: the original implementation > from GNU's findutils, slocate, and mlocate. The advantages of mlocate are: > > * it indexes all the filesystem, but results of a search will only > include files that the user running locate has access to. It does this > by updating the database as root, but making it unreadable for normal > users, who can only access it via the locate binary. slocate does this > as well, but not the original locate. Actually, it does have exactly that feature. > * instead of re-reading all the contents of all directories each time > the database is updated, mlocate keeps timestamp information in its > database and can know if the contents of a directory changed without > reading them again. This makes updates much faster and less demanding on > the hard drive. This feature is only found in mlocate. Indeed. James. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Re: Unknown network traffic
On Fri, Jan 9, 2009 at 5:08 PM, T o n g wrote: > Hi, > > I've tried all the network bandwidth monitoring tools that I know to find > out the unknown network traffic I'm having now, I've tried iftop, netstat, > lsof and pktstat, and still can't find out the result. Please help. > > First, neither of the following command reveal anything suspicious: > > netstat -ap | grep -v ^unix > lsof -i Try switching to single-user mode in order to rule out most locally-running programs and repeating the experiment. At that point you should be able to just run "tcpdup -n -i blah" (where blah is your outward-facing network interface, eth0 on my machine here) and eyeball the raw information. Look for common themes in the local and remote port numbers. > > However, iftop reports: > > 192.168.0.100=> 192.168.0.11.95Kb 1.24Kb 1.31Kb > <=4.71Kb 3.50Kb 3.41Kb This is internal traffic (or should be - both addresses are unroutable RFC1918 addresses) > 192.168.0.100=> i118-17-235-161.s10.a024. 0b130b108b > <= 0b107b 89b > 192.168.0.100=> 71-15-119-132.dhcp.ftwo.t 0b127b106b > <= 0b105b 87b > 192.168.0.100=> 76.105.253.104 636b127b106b > <= 524b105b 87b > 192.168.0.100=> lan31-4-82-227-130-41.fbx 0b127b106b > <= 0b105b 87b > 192.168.0.100=> ctv-86-100-215-242.ip.ryg 0b127b106b > <= 0b105b 87b > 192.168.0.100=> i038098.gprs.dnafinland.f 636b127b106b > <= 524b105b 87b > 192.168.0.100=> host-89-228-137-138.gorzo 0b127b106b > <= 0b105b106b AFAICT most of these are other broadband users. Are you using some kind of p2p tool? If not, perhaps they are compromised remote systems attempting to compromise your machine. This would imply that your computer is connected directly to the Internet, without benefit of a separate firewall device. That's not such a great idea from a security point of view. > > That's all tools that I know, then I google and find pktstat, which reports: > > bps% desc > 107.2 0% icmp unreach port 192.168.0.100 -> 119.40.7.39 > 107.2 0% icmp unreach port 192.168.0.100 -> 122-121-216-117 > 107.2 0% icmp unreach port 192.168.0.100 -> 17 > 107.2 0% icmp unreach port 192.168.0.100 -> 220-136-240-189 > 108.5 0% icmp unreach port 192.168.0.100 -> 227 > 105.4 0% icmp unreach port 192.168.0.100 -> 77.81.248.210 > 105.4 0% icmp unreach port 192.168.0.100 -> 83-157-127-150 > 108.5 0% icmp unreach port 192.168.0.100 -> 84 >icmp unreach port 192.168.0.100 -> 87-121-157-166 > 82.8 0% icmp unreach port 192.168.0.100 -> 93.190.206.248 > 108.5 0% icmp unreach port 192.168.0.100 -> adsl110-221 > 105.4 0% icmp unreach port 192.168.0.100 -> bas3-montreal02-1096681363 > 108.5 0% icmp unreach port 192.168.0.100 -> bau06-5-88-168-64-43 > 107.2 0% icmp unreach port 192.168.0.100 -> cpc4-neat2-0-0-cust924 > 105.4 0% icmp unreach port 192.168.0.100 -> host217-43-58-203 >icmp unreach port 192.168.0.100 -> host70-87-dynamic > 108.5 0% icmp unreach port 192.168.0.100 -> host86-137-255-28 > 107.2 0% icmp unreach port 192.168.0.100 -> i222-150-158-232 > > My normal network bandwidth is almost 0. First of all, these are very small numbers. This almost certainly is not a summary of what's using up all your bandwidth (if that's indeed happening). But these ICMP port-unreachable errors indicate that the remote systems are trying to communicate with a network port you're not listening on. Perhaps they are trying to perform some SQL Server exploit or something like that. James. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Re: OT: IP of computer sending message
Any program running on a Unix-like system can do this using getpeername() (for stream-oriented protocols) or recvfrom() (for datagram-oriented protocols). But as to how to get your software to issue that system call, it's a question for users of that software (I'm sure there's a users' mailing list for it). James -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Re: FQDN vs. domain in /etc/hosts
On Sun, Jan 4, 2009 at 9:11 PM, Stefan Schmidt wrote: > Hello, > > in my understanding the /etc/hosts file should contain an entry with the > FQDN of the host. > > 123.123.123.123 hostname.domain.tld hostname > > I would for simplicity prefer to use a domain name instead of a FQDN. > > 123.123.123.123 domain.tld hostname That will work well enough. Lots of organisations do this with their DNS records:... ~$ host -t A microsoft.com microsoft.com has address 207.46.197.32 microsoft.com has address 207.46.232.182 ... despite the fact that the name is also a domain name ... ~$ host -t SOA microsoft.com microsoft.com has SOA record ns1.msft.net. msnhst.microsoft.com. 2009010502 300 600 2419200 3600 ... and that's on the public part of the Internet. You should feel still less constrained about what happens inside your internal network (up until the point you need to join it to somebody else's). James. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Re: Keystrokes go missing after script exits
On Sat, Jan 3, 2009 at 11:31 PM, Curt Howland wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On Saturday 03 January 2009, James Youngman was heard to say: >> It's left your terminal in a non-echoing mode; this is used for >> example when asking for a password. You can fix this with "stty >> sane". > > Yes, I understand it's gone into non-echo mode. I just didn't know > that word for it. > > Thanks for the after-fix, sure enough it worked. > > Now, can I put that as the last command in my script and not have the > problem in the first place? If it's the last command executed, yes. But the last command executed may not the the final command in the script; it may exit early. There are three obvious ways to solve this problem. 1. Probably the most general solution: Rename the original script and make a new wrapper script that calls it: #! /bin/sh # We save the old terminal mode with "stty -g" and restore it later. # This is broadly similar to just calling "stty sane" but it copes better # with cases like terminal setups where the 'erase' character isn't backspace. orig_terminal_mode=$(stty -g) # run the original script... renamed-original-script # ... and save its return value rv=$? # fix the terminal mode stty $orig_terminal_mode # exit with the same status as the original script did exit $rv 2. Modify the original script: put "stty sane" at the end of the script and before every "exit" command that doesn't appear in a subshell. If there is a chance that the original script will need other changes, this option imposes a maintenance burden on you. 3. Wrap the original script in ( ... ) and reset the terminal mode once it's done. That is, edit the original script so that it looks like the code from (1) but in place of "renamed-original-script" put the entire text of the original script, inside parentheses ( ). This approach has all the disadvantages of option (2) except that you don't need to look for all the exit statements. The reason these options are all apparently complex is that "stty sane" will succeed (that is, exit with status 0) and so any non-zero return value from the script would be masked if you just pasted in "stty sane" at the end. If the script is trying to signal failure by exiting with a non-zero status, masking that bu changing the status to zero would potentially be damaging (i.e. the caller would not find out that the script had in fact failed). James. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Re: Keystrokes go missing after script exits
It's left your terminal in a non-echoing mode; this is used for example when asking for a password. You can fix this with "stty sane". -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Re: Corrupt data - RAID sata_sil 3114 chip
On Fri, Jan 2, 2009 at 9:30 PM, Bernd Schubert wrote: > Hello Bengt, > > sil3114 is known to cause data corruption with some disks. So far I only know > about Seagate, but maybe there issues with newer Samsungs as well? I've experienced data corruption with a SII 0680 ACLU144 (on an ST Labs' A-132 card) with a pair of Seagate ST3300622A drives. I was using them with MD in a RAID1 configuration. James. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Re: weird find error on fresh etch system
On Wed, Aug 13, 2008 at 2:11 PM, Mumia W.. wrote: > On 08/13/2008 12:16 AM, Zach Uram wrote: >> >> I just installed Debian 4.0 and whenever I use find on / I see: >> >> find: WARNING: Hard link count is wrong for ./proc/sys/net: this may >> be a bug in your filesystem driver. Automatically turning on find's >> -noleaf option. Earli er results may have failed to include >> directories that should have been searched . >> >> What is going on and how can I fix this? find is telling you about a kernel bug. You could report it, or upgrade, or ignore the problem. > Never use the find command to search /proc; that is a special virtual > filesystem used to configure your system. If programs touch the wrong things > in /proc, it could create serious problems for your computer. Hmm. Have you ever seen such a problem first-hand, or are you just propagating a rumour you heard somewhere? I ask since find doesn't actually touch the filesystem, it just traverses it. Of course if you specify an action like -delete, then yes, find will touch the filesystem. > The best way to use "find" is to create a database of all files on your > system, and "updatedb" does that. The wisely-written script in > /etc/cron.daily/find gets settings from /etc/updatedb.conf, and those > settings disable looking into "proc" filesystems. Only because the result of indexing /proc is rarely interesting, and always out of date. James. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
System-wide policy to install documentation? Including non-dfsg docs?
Is there any way that I can set up a policy or default like this? (I'm running lenny) 1. Installing foo where foo Recommends: foo-doc causes the installation of foo-doc. 2. Installing bar-doc where bar-doc Recommends: bar-doc-non-dfsg causes the installation of bar-doc-non-dfsg (In other words, always install the documentation, even if it is non-dfsg-free) I'm happy if this only works via (e.g.) apt-get, if that restriction is needed. Thanks, James. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Re: how to run debsums for 'ps' and 'readline'
On Fri, Dec 19, 2008 at 11:25 AM, oneman wrote: > Hi All, > > > chkrootkit is complaining about processes hidden from ps and readdir. So I'd > like to run debsums on them to test the integrity of ps and readdir. > However, 'debsums ps' doesn't work. Wich package name should I use to check > the integrity of these two? readdir is a function in the C library.If it is being fooled, the problem is either in the C library (which busybox will almost certainly also use) or in the kernel (which everything uses). Probably the best option is to boot from a known-good CD or DVD and run your diagnostic tools from that. James. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Re: NFS problems with files.
On Mon, Dec 8, 2008 at 6:57 PM, Brian Schrock <[EMAIL PROTECTED]> wrote: > I am testing a courier-postfix setup using nfs for the Maildir folders > on debian etch, and my client machine is debian/lenny. Everything > seems to work just peachy except for when I use pop/imap for access to > the mail. I have tried with both icedove and evolution using imap and > pop and the problem seems to be identical. Furthermore I have tried > using the Maildir folders on the nfs and on the local server. When I > put the Maildir folders on the local machine everything works fine, > when I put them on nfs I get the problem. > Output of ls -al /var/mail/username/Maildir/new > > ?- ? ?? ?? > 1228445413.V10I5400aaM156972.mail > > And to get a little weirder when I do... > ls -al 1228445413.V10I5400aaM156972.mail > > On the troubled file and in that directory I get this: > ls: 1228445413.V10I5400aaM156972.mail: No such file or directory Hmm. Maybe the inode numbers for the problem files are outside the 32-bit range. If this is the case I can't remember in detail how to solve it - but try forcing both client and server to use version 4 of the NFS protocol. James. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: TTY programming
On Tue, Dec 2, 2008 at 9:34 AM, David Baron <[EMAIL PROTECTED]> wrote: > I have seen loads of postings but no real answer to this: > > I write() a command to the modem > I read() to try to get a response, i.e. OK or if the command is a dial, BUSY > or such. > I do not get anything. > > The commands, dialing, all seem successful and the application works. I simply > cannot report any status. > > Any ideas? You're asking people to debug a program that they have never seen. That's a tough thing to do. I have three suggestions: 1. Use strace(1) to trace the system calls your program makes. Then run minicom under strace(1) and issue the same commands to the modem manually. Compare the system call traces. 2. Go read the source code for a program (or ideally several) that does something similar to what you need. 3. Buy the first edition of W. Richard Stevens' book "Advanced Programming in the Unix Environment". It contains a chapter on tty programming (featuring a program that does bidirectional communication with a PostScript printer). Later editions of this book omit that chapter; TTY programming is hardly mainstream. James. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: When stability is pointless
On Wed, Nov 5, 2008 at 5:40 AM, Nate Duehr <[EMAIL PROTECTED]> wrote: > It is very common for software developers to plow ahead without thinking > much about the versions the distros provide. > > You may want to contact them and see how they would expect users to use > their software effectively. > > It's likely: They won't care. I think that in may cases, this is an unfair characterisation. I'm biased though, I'm an upstream maintainer. I hardly ever hear from the distributions, despite the fact that the software I maintain is installed on over 99% of Linux machines (according to Debian popcon, about 99.8%). The sole exception is Debian (hi, Andreas!). I'm pretty sure the reason here is, once again, manpower. The distibutions include thousands of packages and so the staff who are paid to look after the distribution hardly have any time at all to interact with the upstream comunities, at least on average. The distributions need to figure out where to spend their staff time, and it unsurprisingly most of it goes on high-priority things like glibc, Apache, and the kernel, as you say. Regarding documentation though, I guess the situation is easier in my case; all the documentation that is available for findutils ships in the source tarball, so users always have access to a full set of documentation relevant to the software they are using (they may need to install a separate -doc package, but that's a whole other flamewar). James. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Electricity Cutoffs, EXT3 and Filesystems
On Sun, Nov 9, 2008 at 12:32 PM, James Youngman <[EMAIL PROTECTED]> wrote: > You should arrange for your systems to be cleanly shut down (with, for > example, shutdown) before the UPS runs out of power. There even > exists software for some UPS types that allows you to defer the > shutdown until the UPS is running log (instead of doing the shutdown Oops. That should be "running low". > as soon as you know the power has gone out). James. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Electricity Cutoffs, EXT3 and Filesystems
On Sun, Nov 2, 2008 at 9:39 AM, Volkan YAZICI <[EMAIL PROTECTED]> wrote: > This year I'm obligated to administrate extra ~5 production servers and > as a result of major GNU/Linux headquarters moving from ReiserFS to > EXT3, I started to use EXT3 in those new servers. But unfortunately, > after every electricity cutoff[1], EXT3 just crashes and waits prompt > from me standing at boot. Do you mean that "fsck.ext3 -p" fails and forces you to run it manually? That's not the same as a crash. > I start the servers with Knoppix (Gee!) and > run e2fsck on every single partition. (Keep on imagining this PITA!) No, > pressing `Y' to run a fsck on the partitions doesn't work. I tried my > luck with XFS, but it resulted same as EXT3. I'm really really surprised by this since I had thought that fsck.xfs was a no-op. But then I don't know for sure since I only use it on two filesystems; the other 30 or so are ext3. > [1] Yes, we have couples of UPS boxes around, but they are not capable >of standing the load for many hours. You're doing it wrong :) You should arrange for your systems to be cleanly shut down (with, for example, shutdown) before the UPS runs out of power. There even exists software for some UPS types that allows you to defer the shutdown until the UPS is running log (instead of doing the shutdown as soon as you know the power has gone out). James. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: updatedb for very large filesystems
On Thu, Oct 2, 2008 at 1:29 PM, James Youngman <[EMAIL PROTECTED]> wrote: > On Thu, Oct 2, 2008 at 11:18 AM, Ron Johnson <[EMAIL PROTECTED]> wrote: >> Since find is so disk-intensive, isn't this is only of benefit if /usr, /var >> and /home are on different devices? > > Yes. Disk-head-movement optimisation will not be implemented in > findutils for another six weeks or so. Done; the relevant change is described at http://cvs.savannah.gnu.org/viewvc/findutils/ChangeLog?root=findutils&r1=1.342&r2=1.343 James. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: updatedb for very large filesystems
On Fri, Oct 10, 2008 at 1:05 PM, Ron Johnson <[EMAIL PROTECTED]> wrote: > On 10/10/08 07:28, James Youngman wrote: >> >> On Fri, Oct 10, 2008 at 8:55 AM, Ron Johnson <[EMAIL PROTECTED]> >> wrote: >>> how do you actually optimize disk head movement? >> >> Essentially by modifying fts() to pay attention to struct dirent.d_ino >> and hoping that the inode number either has some relation to the disk >> location, or that the difference between the average and worst case of >> stat ordering is small. For details, see the archives of recent >> discussions on the [EMAIL PROTECTED] mailing list. > > This thread? > > http://www.mail-archive.com/[EMAIL PROTECTED]/msg11327.html That's the one. James. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: updatedb for very large filesystems
On Fri, Oct 10, 2008 at 8:55 AM, Ron Johnson <[EMAIL PROTECTED]> wrote: > On 10/09/08 23:05, James Youngman wrote: >> >> On Wed, Oct 8, 2008 at 3:29 AM, Ron Johnson <[EMAIL PROTECTED]> wrote: >>> >>> I *think* that James Youngman was being sarcastic. If I'm wrong, then so >>> much the better. >> >> I was not being sarcastic. > > Excellent, I've reached my quota for being wrong this year! > > Anyway... in these days of logical block addressing and bad-block remapping, That's not the half of it. > how do you actually optimize disk head movement? Essentially by modifying fts() to pay attention to struct dirent.d_ino and hoping that the inode number either has some relation to the disk location, or that the difference between the average and worst case of stat ordering is small. For details, see the archives of recent discussions on the [EMAIL PROTECTED] mailing list. James, -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: updatedb for very large filesystems
On Wed, Oct 8, 2008 at 3:29 AM, Ron Johnson <[EMAIL PROTECTED]> wrote: > > I *think* that James Youngman was being sarcastic. If I'm wrong, then so > much the better. I was not being sarcastic. James. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: updatedb for very large filesystems
On Thu, Oct 2, 2008 at 11:18 AM, Ron Johnson <[EMAIL PROTECTED]> wrote: > Since find is so disk-intensive, isn't this is only of benefit if /usr, /var > and /home are on different devices? Yes. Disk-head-movement optimisation will not be implemented in findutils for another six weeks or so. James. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: updatedb for very large filesystems
On Wed, Oct 1, 2008 at 12:15 PM, Mag Gam <[EMAIL PROTECTED]> wrote: > I was wondering if its possible to run updatedb on a very large > filesystem (6 TB). Has anyone done this before? I plan on running this > on a weekly basis, but I was wondering if updatedb was faster than a > simple 'find'. Are there any optimizations in 'updatedb' ? With findutils you can update several parts of the directory tree in parallel, or update various parts on a different time schedule. Here's an example with three directory trees searched in parallel with one being searched remotely on another server and then combined with a canned list of files from a part of the filesystem that never changes. find /usr -print0 > /var/tmp/usr.files0 & find /var -print0 > /var/tmp/var.files0 & find /home -print0 > /var/tmp/home.files0 & ssh nfs-server 'find /srv -print0' > /var/tmp/srv.files0 & wait sort -f -z /var/tmp/archived-stuff.files.0 /var/tmp/usr.files0 /var/tmp/var.files0 /var/tmp/home.files0 /var/tmp/srv.files0 | /usr/lib/locate/frcode -0 > /var/tmp/locatedb.new rm -f /var/tmp/usr.files0 /var/tmp/var.files0 /var/tmp/home.files0 /var/tmp/srv.files0 cp /var/cache/locate/locatedb /var/cache/locate/locatedb.old mv /var/tmp/locatedb.new /var/cache/locate/locatedb -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: diagram tool
On Thu, Aug 7, 2008 at 8:15 PM, Damon L. Chesser <[EMAIL PROTECTED]> wrote: > Starting a contract job and I might need to diagram out the network, I > know of diag, anything else out there? http://cheops-ng.sourceforge.net/screenshots.php -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: what's the best IDE for C programming in Debian?
On Sat, Aug 9, 2008 at 6:09 AM, Andrew Sackville-West <[EMAIL PROTECTED]> wrote: > Seeing how powerful it is, but knowing how powerful emacs is, or can > be, I wonder what emacs based tools exist for performing similarly in > emacs? A few pointers to some more powerful code tools in emacs would > be great. This class is over in a couple of weeks, and I've got a > couple projects I'd like to work on in my own time. I'd like to get > back up to where I was in emacs and grow beyond it. I am not aware of anything in (or for) Emacs having the power of the refactoring features of the Java IDE in Eclipse. If somebody would like to correct me on that I would be very grateful indeed. However, there is something for Python, I understand: the Bicycle Repair Man. I found http://c2.com/cgi-bin/wiki?BicycleRepairMan but there may be better pages. James. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Broke /etc/apt/preferences when trying to use just one package from unstable.
I modified /etc/apt/{preferences,sources.list} to get just flashplugin-nonfree from unstable. That seemed to work. However, now I find that "apt-get install libsdl1.2-dev" results in this error: # apt-get install libsdl1.2-dev Reading package lists... Done Building dependency tree Reading state information... Done Package libsdl1.2-dev is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source E: Package libsdl1.2-dev has no installation candidate Could somebody take a look at my preferences and sources.list files and explain to me what I broke and how?I attach both files (/etc/apt/sources.list.d is empty). Thanks, James. preferences Description: Binary data sources.list Description: Binary data
Re: to cluster or not? what's best solution for 2-node HA?
On Fri, Jul 25, 2008 at 10:32 PM, Bob <[EMAIL PROTECTED]> wrote: > however - you can run drbd in a primary/primary config - this > sounds like what I want. But it sounds like I need a clustering files > system to do this like GFS. After countless hours researching this, > I'm still not sure how to do it - do I need GFS? OCFS? NBD? There is a presenation on Ganeti that might help you figure this out. See http://ganeti.googlecode.com/files/Ganeti-FISL-2008.pdf I believe Ganeti is in the Debian repository. It's my understanding though that Ganeti works best with three machines, because that way you still have dual-homed data even if one node already failed. James. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: dumb question about tar
On Thu, Jul 17, 2008 at 7:16 PM, David Denney <[EMAIL PROTECTED]> wrote: > Hello all, > When you tar a file (i.e. a backup) to a destination disk, does tar build > the file on the destination disk, or does it create it in a tmp file, > memory, etc then move it to the final destination? I have to think it > builds it in the destination location, but want to make sure. FWIW you can find out the answer yourself by using "strace". James. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: [OT] How to Analyze/Study Source Code?
On Wed, Jul 16, 2008 at 5:57 PM, Amit Uttamchandani <[EMAIL PROTECTED]> wrote: > Hey everyone, > > Just wondering how you guys go about studying code? Do you read every > single source file and then make notes? Or is there a tool that goes > about and draws out relationships between source code files? > > I ask this because I am looking into adding a feature/fix to pcmanfm > but it looks like its going to take me a while to understand how > everything works together. I generally start by reading the documentation that comes with it, including files like HACKING and TODO. Then I read the Makefile and run etags to generate a symbol index. Then I try to understand the particular bit of the program I'm proposing to work on. Frequently reading the code is enough. If not though, I often use strace to "see through" the code to what the program actually does. While I know about cflow, I rarely use it. It's not uncommon for me to want to patch a program, but in general 50% of the total time I spend doing that is occupied with finding the source repository, checking the code out and making it build. Actually understanding the code, changing it and testing the result takes only about half the total time. James. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: [OT] the limits of googling
On Sat, Jun 28, 2008 at 2:59 PM, Hugo Vanwoerkom <[EMAIL PROTECTED]> wrote: > Hi, > > Google searching is (still?) primitive. > > I would like to know the answer to a simple question: > > What are the most recent laptops that run Linux *and* have a working analog > (RJ-11) modem installed? > > Listed by highest price first. > > Hugo > > PS All the searching I have done lead me to believe that they don't exist. > But how do you prove that with Google? Not strictly an answer to your question, but the Linux Emporium sell a proper hardware modem in a PCMCIA card, which should work with most laptops I'd guess. James. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Hooks for read-only /usr
I like to have a read-only /usr filesystem. So I have ... # cat /etc/apt/apt.conf.d/50readonly-usr DPkg { // Auto re-mounting of a readonly /usr Pre-Invoke {"mount -o remount,rw /usr";}; Post-Invoke {"mount -o remount,ro /usr || true";}; } Unfortunately this works quite badly. During execution of apt, services are stopped and started again, so it is frequently the case that by the time apt runs the Post-invoke hook, processes are holding open files in /usr. This prevents /usr being re-mounted (that's the reason for the "|| true"). Is there a better way to do this? One idea that occurred to me was to have dpkg do this; it could remount /usr read-write before removing the old files and unpacking the new, and mount it read-only after perhaps the package configuration stage (before restarting things). Anyway, is something like this already possible? Thanks, James. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Any isencrypted function available?
On Wed, Jun 18, 2008 at 8:26 AM, buyoppy <[EMAIL PROTECTED]> wrote: >> Try this implementation, which I have not tested (or >> even compiled). (I realised subsequently that it reads past the end of the buffer if system memory is low and the input buffer was less than PLANB_BUF_SIZE; oops). > Thanks for your code, which may be useful when I would > have miss-erased zip extension of an archive. > But I mean 'encrypted' (NOT 'compressed') data. > Thanks. A common characteristic of encrypted data is that it has a low degree of redundancy; the method for which I provided code performs a rudimentary test for redundancy in the data simply by attempting to compress it. If you want a better method of attacking the problem, and to be sure there are more sophisticated techniques, you will need to learn about information theory. James. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Any isencrypted function available?
On Sun, Jun 15, 2008 at 10:56 PM, buyoppy <[EMAIL PROTECTED]> wrote: > I saw a webpage of Solaris's 'isencrypted' function which > inspects some data in a buffer is encrypted or not using > some algorithm including statistical analysis. But now I > cannot find that page on the Internet... Try this implementation, which I have not tested (or even compiled). #include #include enum { PLANB_BUF_SIZE = 512; INADEQUATELY_EXPLAINED_MAGIC_NUMBER = 5; }; static int incompressible(const char *inbuf, size_t len, char *outbuf, size_t outlen) { int rv = compress2(outbuf, outlen, inbuf, len, INADEQUATELY_EXPLAINED_MAGIC_NUMBER); if (Z_BUF_ERROR == rv) return 0; /* it grew. */ else if (Z_MEM_ERROR == rv) return -1; /* meh, it's a guess. */ else return rv > len; } int isencrypted(const char *buf, size_t len) { int retval; char planb_buf[PLANB_BUF_SIZE]; void *out = malloc(len); if (out) { retval = incompressible(buf, len, out, len); free (out); return retval; } else { return incompressible(buf, PLANB_BUF_SIZE, planb_buf, PLANB_BUF_SIZE); } } -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Getting network settings to stick
On Mon, Jun 9, 2008 at 9:16 PM, <[EMAIL PROTECTED]> wrote: > Greetings > > I have put Debian Etch on my laptop. Somewhere during the course of the > install the IP address I assigned didn't stick. I have used the ifconfig > command in an attempt to set it but the system doesn't retain it between > boot ups. I have also looked at the file in the /etc/network directory but > it has the address set in there. How can I get the system to retain the > desired IP address? > > Any pointers and comments will be appreciated. http://www.debian.org/doc/manuals/reference/ch-gateway.en.html#fr55 James. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]