(toughed out) Re: reboot/halt/shutdown does nothing
On Tue, 18 Feb 2014, Zhang Weiwu wrote: I have exclude another possibility. I am thinking: 1) perhaps the message in /var/log/messages is not produced by init, but by reboot/halt/shutdown, and 2) perhaps init is not invoked at all. So I run 'init 6' as root. This time, there is no new message in /var/log/messages, prooving 1), and 'init 6' did absolutely nothing, disprooving 2). I was wrong. init 6 behave differently than reboot/halt/shutdown. It did shutdown a lot of services - my last post was sent a few seconds too early. Among the services 'init 6' shutdown (which reboot/halt/shutdown failed) are: - (in /etc/rc.6.d) apache2 - (in /etc/rc.6.d) mysql - (in /etc/rc.6.d) exim4 The services 'init 6' did NOT shutdown are: - portmap (manual break "/etc/rc6.d/K06portmap stop" worked) - networking (because I can still establish new ssh connection to this server) - rsyslogd I have: $ ls /etc/rc6.d/ K01apache2K02mysql K06portmap K10lvm2 K01atdK03sendsigs K07hwclock.sh K11umountroot K01exim4 K04rsyslog K07networking K12reboot K01urandomK05umountnfs.sh K08ifupdownREADME K01xe-linux-distribution K06nfs-commonK09umountfs My suspecision is that K03sendsigs failed, because K02* was terminated, K04* and K06portmap wasn't. K03sendsigs is in between. ps(1) shows sendsigs running: $ ps ax | grep init 1 ?Ss 0:39 init [6] 19299 ?Ss 0:00 /bin/sh /etc/init.d/rc 6 19401 ?S 0:00 /bin/sh /etc/init.d/sendsigs stop 23319 pts/9S+ 0:00 grep init So the task is to figure out what sendsigs does and why it hangs. There is no manual, so I go the hard way to read its source: It does the "Asking all remaining processes to terminate" thing. So I suppose some daemon refuse to succumb, and sendsigs is waiting for it, or failed to kill nastily and is thus confused. I look at /var/run: $ ls -F /var/run/ apache2/ ldapi@ portmap.pidscreen/sshd.pid crond.pid motd portmap.state slapd/ utmp crond.reboot mysqld/ rpc.statd.pid sm-notify.pid xe-daemon.pid exim4/portmap_mapping rsyslogd.pid sshd/ portmap was manually stopped, therefore, daemons don't always remove pid before they leave, and the remaining files in /var/run does not indicate daemons who refuse to die. Did sendsigs spit any error message? There were none in /var/log/syslog and /var/log/messages. Another user reported seeing error on screen from sendsigs while not able to finding it in both log files, so it is not logged there: I am operating a remote server, there is no screen for me to see. His problem may be the same as mine. As he solved it, he post: http://forums.debian.net/viewtopic.php?f=5&t=63896 "A check forced of filesystem solved the problem." I meditated for a while on this "check forced of filesystem", the grammar isn't correct and the whole sentence makes no sense. Does he mean "reboot -f" to force reboot? I have tried that and didn't make any difference than "reboot" without "-f". Does he mean manually umount all non-root filesystem? My /var/local is the only non-root physical file-system, and it is in use. 'sudo lsof /var/local' hangs there for 1 hour, so it remain a mystery which process is using it, but accessing its files is fine and error-free. Besides, there are various *umount* in /etc/rc.6d/ and they are all ordered after sendsigs, so they are not suposed to cause problem until sendsigs finishes. So deadend again. Now as I browse through the process tree, I found one process that is started 2 weeks ago and should be long dead: $ ps ax | grep youtu 18380 ?D 0:03 python /usr/local/bin/youtube-dl I distantly remember it had been run on a NFS mount which was jammed, and later, because umount not possible (NFS server gone), I had done lazy umount: # umount -l /mnt/nfs So I believe this one the culprit. "kill -9" cannot kill it, confirming my guess. https://wiki.debian.org/Kill says if you can't kill with "kill -9", you should reboot, which brings me back to this problem, chicken or egg first? With no way to kill 18380 but to reboot, and no way to reboot but to kill 18380, I instead killed sendsigs with -TERM. The result is trouble: I was immediately kicked out of ssh session, server stopped to responding PING, and half an hour later I capitulated and called datacenter for a cold reboot. After the server is online again, I immediately did a reboot and succeeded. So, it is very likely the stall process 18380 that stems reboot/shutdown. My conclusion so far: 1. If you had an NFS mount, and NFS server is gone, you cannot umount it unless you reboot, which won
Re: reboot/halt/shutdown does nothing
On Tue, 18 Feb 2014, Zhang Weiwu wrote: Thank you for the hint. I followed your test method and the test result show this problem has nothing to do with a hanging service. I have exclude another possibility. I am thinking: 1) perhaps the message in /var/log/messages is not produced by init, but by reboot/halt/shutdown, and 2) perhaps init is not invoked at all. So I run 'init 6' as root. This time, there is no new message in /var/log/messages, prooving 1), and 'init 6' did absolutely nothing, disprooving 2). So, the problem is directly within init daemon. Now what? -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/alpine.DEB.2.10.1402181138340.4922@lyonesse
Re: reboot/halt/shutdown does nothing
On Mon, 17 Feb 2014, Karl E. Jorgensen wrote: So init knows that you want to shut down/reboot.. My guess is that one of the "early" init scripts are hanging. Thank you for the hint. I followed your test method and the test result show this problem has nothing to do with a hanging service. The first in asciibetic order is 'apache2'. If I stop it, it succumb easily without hanging. I described previously that after issuing reboot/halt/shutdown, the website being served by apache2 is still running, hence init daemon did not attempt to shutdown even the earliest service. It seems init knows I want to shutdown, and acknowledge it, and then ignored it. In my past years I came across many services that refuses to die, and they were killed after timed out, so normally init daemon knows how to kill without grace. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/alpine.DEB.2.10.1402181125310.4794@lyonesse
Re: reboot/halt/shutdown does nothing
On Mon, 17 Feb 2014, Brian wrote: Possibly of help: http://askubuntu.com/questions/7114/why-cant-i-restart-shutdown Thanks for the link but I am pretty sure they are talking about a different problem. The link you provided is among the 100+ search result I found on google that does not address my problem. 99.9% of the problems listed on google is about the machine failing to respond or reboot AFTER closed most services. In other words, the machine is put to an unresponsive status, OR the reboot skipped POST. Both are not my case, hence I addressed "reboot does NOTHING" in the email subject. The difficulty of this problem is that it is too hard to filter out unrelated help messages In my case reboot/halt/shutdown did not attempt to turn off any running system services. The reboot process is not even started. None of the processes are notified to terminate and none of the filesystems are umounted. The machine has same number of processes before and after issued reboot command. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/alpine.DEB.2.10.1402172147580.2483@lyonesse
Re: video compression?
On Mon, 17 Feb 2014, Thomas H. George wrote: Is there a best debian program to compress avi videos enough to send them by email? I have found ffmpeg and avidemux and am trying to learn to use them but have not had much success so far. They are both good, but even if you can get the video down to a few megabytes, the other (or his software) may not expect video in email attachment, causing trouble. e.g. their email client on mobile phone may not properly handle such case. (putting into email) it is unusual thing to do, at least for those who often send video. Many offered video hosting, and any cloud service / FTP service can host videos too. Perhaps you can make use of twoftpd/vsftpd and other file hosting software instead? -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/alpine.DEB.2.10.1402172140480.2391@lyonesse
Re: reboot/halt/shutdown does nothing
On Mon, 17 Feb 2014, Joe wrote: Do you by any chance have pulseaudio installed? I ask because my sid workstation started doing almost exactly this a few days ago. No. It was a server box. What you said does hint me that if I can access the physical machine there may be some clue on the screen, but then again anything there should be in one of /var/log/messages /var/log/syslog and /var/log/dmesg - yet in these I see nothing more than the previously-noted one-liner... -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/alpine.DEB.2.10.1402171704230.3341@lyonesse
reboot/halt/shutdown does nothing
Using Debian 6.0. reboot/halt/shutdown does nothing except announcing the shutdown and halt the ssh session that issued the command. But beyond that it really did nothing. Among the things it did not do are: - no process are killed or terminated. None of mysql, apache, cron daemons are shut down, and the website it serves keeps online just fine. - although the ssh session whence the command issued is halted, I can still login with a new ssh session. - last(1) and uptime(1) doesn't remember having any shutdown. The only thing I can find that prooves I issued shutdown is a one-line messages like this in /var/log/messages: Feb 17 07:55:30 localhost shutdown[11212]: shutting down for system halt Or this: Feb 17 07:54:24 localhost shutdown[11084]: shutting down for system reboot The problem is reproducible: if I unplug the power, and start again, it predictablly fail to shutdown / reboot. It is extremely difficult to google for a solution, since "debian cannot reboot" gives all sorts of different problems that are not like this one. Adding search keywords like '/var/log/messages', 'init daemon' etc didn't help. The manual of shutdown, halt, reboot and init give little information on troubleshooting or how it works internally (for me to start tracing the problem), only explained how it is supposed to be commanded. I've been an sysop for debian hosts for 6 years, and sysop of other distributions for 10 years, it surprised myself that after so many years I still found clueless occassions. I also thought of replacing init daemon with something else, and realized systemd wasn't in Debian 6.0. Thanks a lot for hints and help! -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/alpine.DEB.2.10.1402171629080.2666@lyonesse
looking for a clock, minimum and can play sound
Hello. I am looking for an count-down clock. Features are: * count down to up to 300 seconds. I wish to configure my fluxbox to activate it by Ctrl+6, which counts down 60 seconds, Ctrl+3 to count down 30 seconds, thus it must be able to accept commandline parameter for counting down. * play a sound when count down to zero. * It's not bad to have it with X11/gui, although console app would do (in that case sleep(1) more or less works). It's even better if it is implemented as a progress bar so I can configure my fluxbox to put it to the bottom/side of screen and put it half-transparent. I found only one such application in package repository (timer-applet), but I am on a really slow computer and wish to have minimum overhead to start the application, and although i really appreciate having opensource applications designed with a good usability concept and guideline, I don't need it myself in this particular case, thus timer-applet seems overkill for this purpose. Thanks for recommendation in advance! -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4d230d46.7020...@realss.com
[SLVED] Re: how to get pid when I start the process
Several people offered advise. The trick is really how to locate and kill the parent process, because I have tried otherwise and failed. Following suggestion from Bob Proulx, killing all processes would ends up with corrupted temporary files in my case. Bob wrote in detail explanation of how thinks works which should serve great reference material for new reader/learners on the list. One idea offered by Chris Davies is to find the process with R tag, but I tried and end up feeling that one isn't always the parent process. Bill Dennen and Richard Hector together offered the advice to run the process in foreground and sink them to background with shell '&' postfix, and then obtaining the sunken process' ID from the shell using special '$!', which works wonderfully for me, thus solved the case. Thanks all for comments. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4d16c883.8030...@realss.com
how to get pid when I start the process
Hello. I usually start amuled and kill it after a few hours, I do such thing once a day. Usually I do it like this: In one console: $ amuled In another: zhangwe...@mesopotamia:~$ ps ax | grep mule 13595 zhangwei 14080 R N amuled 13598 zhangwei 14080 S N amuled 13600 zhangwei 14080 S N amuled 13603 zhangwei 14080 S N amuled 13612 zhangwei 1352 Sgrep mule zhangwe...@mesopotamia:~$ kill 13595 Note that I should always kill the least-numbered process, I tried otherwise and always end up in trouble. Question is, how do I script-lize this? The only difficulty is to get the pid in script. I could use an one-liner awk script to analyses the output of ps, but that sounds overkill. Is there a better way? Best. & Thanks in advance! -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4d12f2c8.9070...@realss.com
Re: what is the use of -c parameter of column(1), can you demonstrate with an example?
On 11/17/2010 07:39 AM, Phil Requirements wrote: > expand--> converts tabs to spaces > column--> takes a list and displays it in columns > column -t --> takes lines of data, splits each line, displays the result in > columns > While I see it this way: expand--> Format tab-indented text and tab-separated tables using spaces. column -t --> Format tab-separated tables using spaces. column--> Format lists into columns. Pick this scenario: A user have tab-separated tabular data. 1. He try to format it, using expand -t 8 2. He see it's not good enough, he does it again with expand -t 10 3. He see it's okay for some columns, but is too wide for others. Then he uses column -t Thought the whole process, the source data doesn't change, the purpose doesn't change, but tool changed. I follow the idea that usage leads to tools, that "you have tools for a usage", while traditional column tool seems to design from tools to usage, that "you have tools which can used for usages". I guess this is more rational from learning prospective. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4ce36446.5030...@realss.com
Re: what is the use of -c parameter of column(1), can you demonstrate with an example?
On 11/03/2010 10:04 AM, Zhang Weiwu wrote: problem: The usage with -t is to form a table, which, although code level implementation is similar to multi-column layout, in fact is a very different usage than what is mentioned in the first paragraph. Now I think the right move would be to add the -t parameter to the command it really belongs to: expand(1) Quote from manual: Convert tabs in each FILE to spaces, writing to standard output. With no FILE, or when FILE is -, read standard input. The feature of expanding field separator to an automatically calculated value existed in column as a convenient (or lazy) design, not a usage-oriented design. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4ce1fba4.4050...@realss.com
Re: not able to drive a PCMCIA harddisk, what to do?
On 11/16/2010 12:31 AM, Camaleón wrote: What a strange name for a machine running Debian>;-P Sorry, the machine is really debian, but in doubt of whether or not this is a debian-specific problem I decide to try my luck with Ubuntu live CD and stuck there as well (although not sure if it is 100% the same error as I had on Debian), so directly send the original post from Ubuntu live-CD. Besides, this issue feels kernel-related, I guess I would not have much luck in Ubuntu community as they are more usage-oriented than technology oriented (which IMHO is a good thing!). Thanks for introducing me to kernel list. Best. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4ce1da03.4010...@realss.com
not able to drive a PCMCIA harddisk, what to do?
Hello. I put in a PCMCIA harddisk and wait with the hope something new appear as /dev/sda*, until the hope vanishes. I tried briefly google without luck, yet finding detail howto only for 2.4 kernel (in linux document project). Where do you suggest me to go on from here? Detail follows: Script started on Mon 15 Nov 2010 02:43:07 PM UTC r...@ubuntu:~# dmesg | tail [ 834.112153] pcmcia_socket pcmcia_socket0: pccard: PCMCIA card inserted into slot 0 [ 834.115496] pcmcia 0.0: pcmcia: registering new device pcmcia0.0 (IRQ: 4) [ 834.195175] scsi5 : pata_pcmcia [ 834.208260] ata4: PATA max PIO0 cmd 0x100 ctl 0x10e irq 4 [ 839.372258] ata4.00: qc timeout (cmd 0x91) [ 839.372397] ata4.00: failed to IDENTIFY (INIT_DEV_PARAMS failed, err_mask=0x4) [ 849.536245] ata4.00: qc timeout (cmd 0x91) [ 849.536386] ata4.00: failed to IDENTIFY (INIT_DEV_PARAMS failed, err_mask=0x4) [ 859.700259] ata4.00: qc timeout (cmd 0x91) [ 859.700399] ata4.00: failed to IDENTIFY (INIT_DEV_PARAMS failed, err_mask=0x4) r...@ubuntu:~# pccardctl ls -v Socket 0 Bridge:[yenta_cardbus] (bus ID: :00:09.0) Configuration: state: on ready: yes Voltage: 3.3V Vcc: 3.3V Vpp: 0.0V Socket 0 Device 0: [pata_pcmcia] (bus ID: 0.0) Configuration: state: on Product Name: TOSHIBA MK5002MPL Identification: manf_id: 0x0098 card_id: 0x function: 4 (fixed disk) prod_id(1): "TOSHIBA" (0xb4585a1a) prod_id(2): "MK5002MPL" (0xe39b7163) prod_id(3): --- (---) prod_id(4): --- (---) r...@ubuntu:~# pccardctl ident Socket 0: product info: "TOSHIBA", "MK5002MPL", "", "" manfid: 0x0098, 0x function: 4 (fixed disk) r...@ubuntu:~# ls -lR /sys/bus/pcmcia /sys/bus/pcmcia: total 0 drwxr-xr-x 2 root root0 2010-11-15 14:28 devices drwxr-xr-x 3 root root0 2010-11-15 14:43 drivers -rw-r--r-- 1 root root 4096 2010-11-15 14:43 drivers_autoprobe --w--- 1 root root 4096 2010-11-15 14:43 drivers_probe --w--- 1 root root 4096 2010-11-15 14:43 uevent /sys/bus/pcmcia/devices: total 0 lrwxrwxrwx 1 root root 0 2010-11-15 14:41 0.0 -> ../../../devices/pci:00/:00:09.0/0.0 /sys/bus/pcmcia/drivers: total 0 drwxr-xr-x 2 root root 0 2010-11-15 14:43 pata_pcmcia /sys/bus/pcmcia/drivers/pata_pcmcia: total 0 lrwxrwxrwx 1 root root0 2010-11-15 14:43 0.0 -> ../../../../devices/pci:00/:00:09.0/0.0 --w--- 1 root root 4096 2010-11-15 14:43 bind lrwxrwxrwx 1 root root0 2010-11-15 14:43 module -> ../../../../module/pata_pcmcia --w--- 1 root root 4096 2010-11-15 14:43 new_id --w--- 1 root root 4096 2010-11-15 14:43 uevent --w--- 1 root root 4096 2010-11-15 14:43 unbind r...@ubuntu:~# exit Script done on Mon 15 Nov 2010 02:44:48 PM UTC -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/alpine.deb.2.00.1011152327330.1...@sherwood
Re: tool to benchmark CPU MIPS/FLOPS
On 11/12/2010 10:57 AM, David Jardine wrote: > Google will probably lead you to an explanation of > what BogoMIPS are. Sure, I checked bogomips before posting a message to this list. I guess it is not too relative to the original question as bogomips counts only the instructions that does nothing. Or am I wrong? -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4cdcba30.5080...@realss.com
tool to benchmark CPU MIPS/FLOPS
Hello. Failed to google a result (keyword: MIPS FLOPS Linux) here I ask in the list. Wikipedia mention MIPS (million instructions per second) and FLOPS (similar but calculate float point) for some of CPU performance indicators. Is there some tool to benchmark this in Debian? Thanks. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4cdca1ea.2060...@realss.com
Re: what is the use of -c parameter of column(1), can you demonstrate with an example?
On 11/03/2010 01:44 PM, Phil Requirements wrote: > > I find that the column utility belongs to bsdmainutils package, so > it's a BSD application, not a GNU one. I think it would make sense to > file a bug, since you want to offer an improvement. Thanks for point that bsdmainutils out. I had been using FreeBSD for a few years before using Linux. I wonder which is the true upstream of bsdmainutils? I might file the bug in FreeBSD project, if it is the upstream of this Linux package, and hope the changes slip in Linux in a few years. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4cd109d3.9080...@realss.com
Re: what is the use of -c parameter of column(1), can you demonstrate with an example?
On 11/02/2010 08:01 PM, Chris Jackson wrote: > You could perhaps use awk: > > http://unstableme.blogspot.com/2008/12/awk-formatting-fields-into-columns.html this blog post re-invented the wheel of what column -t is intended. almust...@orphalese:~$ column -t /tmp/cat NBSModule Status 54670 Reg P 56783 Reg F 56784 Smk P 56744 Reg F I guess if column(1) man page is written to quality the blog poster might not have missed it. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4cd0c31e.7010...@realss.com
Re: what is the use of -c parameter of column(1), can you demonstrate with an example?
On 11/02/2010 08:01 PM, Chris Jackson wrote: > -c is for the total number of columns. Having said that, I can't get it > to actually do anything, so I could be wrong. > > You could perhaps use awk: > > http://unstableme.blogspot.com/2008/12/awk-formatting-fields-into-columns.html > > (bit fugly) or, depending on exactly what you need, look at pr(1). Can someone dealt with gnu before tell if gnu utilities too bureaucratic to accept any change? If they still can accept some change, I would like to request an update the man page (I wouldn't file a bug just to wait for it to sink in some decades). It says: The column utility formats its input into multiple columns. Rows are filled before columns. Input is taken from file operands, or, by default, from the standard input. Empty lines are ignored. The options are as follows: -c Output is formatted for a display columns wide. -t Determine the number of columns the input contains and create a table. Columns are delimited with whitespace, by default, or with the characters supplied using the -s option. Useful for pretty-printing displays. This man page have 2 problems. First: The first paragraph's mentioning of 'column' obviously means something different than the '-c' paragraph's mentioning of 'column'. In the first paragraph it means what we usually mean column in typography, like on daily newspaper: one or more vertical blocks of text positioned on a page, usually wraps at 3 to 10 words per line. The '-c' paragraph it means what column means in man stty(1). Second problem: The usage with -t is to form a table, which, although code level implementation is similar to multi-column layout, in fact is a very different usage than what is mentioned in the first paragraph. A less confusing version from a non-English speaker would be to change it to: The column utility formats its input into a multi-column layout or to a table. By default it forms a multi-column layout, taking the input, filling rows before columns. With -t it forms a table, expanding the field separator to align table columns. The options are as follows: -c columns Output is formatted for a terminal that has that number of columns. Default is the current terminal's column number. Refer to stty(1) for more info about terminal columns. A character is as wide as one or two columns of a terminal. -t Create a table instead of making a multi-column layout. Columns are delimited with whitespace, by default, or with the characters supplied using the -s option. Useful for pretty-printing tabular data. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4cd0be64.20...@realss.com
what is the use of -c parameter of column(1), can you demonstrate with an example?
from man column(1) -c Output is formatted for a display columns wide. Try: almust...@orphalese:~$ echo aaa bbb | column -c 20 expected result (17 spaces): aaabbb actual result: almust...@orphalese:~$ echo aaa bbb | column -c 20 aaa bbb Confusing. Or do I misunderstand the purpose of column(1)? Thanks. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4ccff608.1060...@realss.com
Re: scripting question: to parse data with varname=value pattern the easiest way?
On 11/02/2010 05:04 AM, Karl Vogel wrote: >On the other hand, if someone sneaks something like >result_04: dc="3" rm /something/valuable Thank you! very informative, and, kinda fun to read. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4ccff56c.90...@realss.com
scripting question: to parse data with varname=value pattern the easiest way?
Hello. A program output is like this: result_01: a="23" b="288" c="A_string" ac="34" result_02: a="23" b="28" c="A_string_too" dc="3" I am writing a script to output values of b if b is in the result set. It would be rather easy to match value of with regular expression: /b="([^"]*)"/ # \1 would be the value of b. Out of curiosity I just wonder is there an alternative way? One came to my mind is to replace result_* with an invoke of awk, then the name=value pattern become parameter of awk, then I can simply do '{print $b;}' to get value of b. I tried that without success. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4cce70ed.7050...@realss.com
[SOLVED] Re: a data rate threshold tool?
Thanks for all of you. The answer using pv(1) is what I need. pv is a 'pipe viewer' that display the progress of a command-line pipe. It might also able to display other pipes. It is new to me that the tool perform data rate limit task as well. A brief check shows trickle, as suggested, is a tool for network bandwidth limit, that might also be useful in cases. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4cb7b7db.2050...@realss.com
Re: tools to improve harddisk performance by short-stroking?
I noticed I can find out files that were never accessed after the 1st month I installed my debian without any accounting mechanism but only by atime. In fact, if I pick up a random file on my system, the chance it was never accessed since after 1month of debian installation is a bit higher than it was. On 2010年10月08日 12:42, Tom Furie wrote: > How do you determine the atime without accessing the file Checking a file's atime is not considered accessing it. almust...@orphalese:~$ find Music/ -atime +147 Music/Flamenco. Una antologia de cante y baile andaluces - Poema de la guitarra (rito y geografia del Toque) - Vol. 1 de 4.avi Music/Hans_Zimmer-Sherlock_Holmes_OST-2010-FRAY/06-hans_zimmer-hes_killed_the_dog_again.mp3 Music/Hans_Zimmer-Sherlock_Holmes_OST-2010-FRAY/08-hans_zimmer-not_in_blood_but_in_bond.mp3 Music/Hans_Zimmer-Sherlock_Holmes_OST-2010-FRAY/10-hans_zimmer-panic_sheer_bloody_panic.mp3 Music/Hans_Zimmer-Sherlock_Holmes_OST-2010-FRAY/07-hans_zimmer-marital_sabotage.mp3 Music/Hans_Zimmer-Sherlock_Holmes_OST-2010-FRAY/05-hans_zimmer-data_data_data.mp3 Music/Hans_Zimmer-Sherlock_Holmes_OST-2010-FRAY/09-hans_zimmer-ah_putrefaction.mp3 almust...@orphalese:~$ sleep 10 almust...@orphalese:~$ find Music/ -atime +147 Music/Flamenco. Una antologia de cante y baile andaluces - Poema de la guitarra (rito y geografia del Toque) - Vol. 1 de 4.avi Music/Hans_Zimmer-Sherlock_Holmes_OST-2010-FRAY/06-hans_zimmer-hes_killed_the_dog_again.mp3 Music/Hans_Zimmer-Sherlock_Holmes_OST-2010-FRAY/08-hans_zimmer-not_in_blood_but_in_bond.mp3 Music/Hans_Zimmer-Sherlock_Holmes_OST-2010-FRAY/10-hans_zimmer-panic_sheer_bloody_panic.mp3 Music/Hans_Zimmer-Sherlock_Holmes_OST-2010-FRAY/07-hans_zimmer-marital_sabotage.mp3 Music/Hans_Zimmer-Sherlock_Holmes_OST-2010-FRAY/05-hans_zimmer-data_data_data.mp3 Music/Hans_Zimmer-Sherlock_Holmes_OST-2010-FRAY/09-hans_zimmer-ah_putrefaction.mp3 -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4cb55270.9010...@realss.com
Re: tools to improve harddisk performance by short-stroking?
On 2010年10月10日 05:45, Andrei Popescu wrote: > IMVHO, I think at least part of the speed increase is based on the fact > that the head(s) *never* travel to the "back" of the harddisk. > A brief search found most of the files on my harddisks are *never* accessed (since the Debian system installation).
a data rate threshold tool?
Hello. I found my application, which was supposed to run 10 hours, either run and starve every other service on it, or doesn't run at all. Even with nice and ionice, I cannot avoid other web services starved by this application. And it has to run on the production server. One trick that comes to my mind is to use a data rate threshold tool to limit the data rate input is fed to the application. $ threshold --rate 20KB/s < data_source | my_greedy_application Is there such a tool in Debian? Thanks. Running Debian 5. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4cb05732.1000...@realss.com
Re: tools to improve harddisk performance by short-stroking?
On 2010年10月08日 04:03, Ron Johnson wrote: > > You'd need to add accounting complexity to the kernel (where would it > put the accounting data?) I had been too brief, but if you read the article I referred to, it works best only in case you put rarely accessed file to the posterior, not 'infrequently accessed file' to the posterior. To find out infrequently accessed file you need accounting. To find rarely accessed file you only need to look at atime. The difference is due to there are two factors slows down: disk spinning speed and head movement speed. If there is only the disk spin speed factor, then put infrequent file to the bottom helps a lot; if counting in the second factor, than only putting rarely accessed files at the bottom helps a lot. Suppose you have one infrequently accessed file at the posterior, and it's accessed, than the moment accessing it, access to every other file slows down as the head have to travel back afterwards, that's why the article suggest not to put any data at all to the posterior (even infrequent ones), while I think not putting any data at the posterior should have the same performance gain of putting only rarely accessed file there. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4cae66bd.4060...@realss.com
tools to improve harddisk performance by short-stroking?
Thanks to the national holiday (Beijing) I begin to read some article marked for free-time reading a few years ago. One of them is short stroking. http://www.tomshardware.com/reviews/short-stroking-hdd,2157.html The article is awfully long just to give a simple idea: by only using the first 20% of hard disk space you get about 3 to 4 times of hard-disk performance gain. The less you use your hard disk space, the more performance gain you get, you can get as much as 5 times faster HDD by using less than 10% of hard-disk. The article says, the only disadvantage of this method is you don't use the rest of the hard disk. Finish reading the article it makes obvious to me that, if this "technology" is really so powerful, it should have already been implemented in OSes, like Linux, without necessarily abandoning the slow part of hard-disk space but instead put rarely used data there. Technically it cannot be too difficult to design file system tools in the way that it tends to put rarely-accessed files to the end of the partition that holds the file system. I am sure I have many files on my computer with atime a few years ago (e.g. man page for hier; files I moved to Trash a few years ago), they can be moved to the bottom of HDD space with a performance gain. Since the knowledge seems to be decades old (some references to this idea are in 1990s under different names), if the article's many-time-hdd-performance-gain is true, in the decade there should already been harddisk performance speedup tool that moves rarely accessed file to the bottom of file system once a week or so and get me a 3 time boost of HDD performance. Question is how to find such a tool? A google search for such tool end up in vain, that seem to suggest the tool doesn't exist, which means the article is probably wrong. Note that I read about methods of partitioning harddisk to get short-stroking advantage, that wouldn't be optimal, because human has to decide what are frequently accessed files (put them to first partition) and what are rarely accessed files (put them on later partitions), and a tool can do this thing much better than human. Besides, human doing partition optimization can only choose one of /var, /usr, /home, /tmp and "swap" as "rarely accessed", the fact is none of them are rarely accessed, while most of them contain rarely accessed files. That's a very bad granularity compare to what specialized tool could do. Thanks in advance for comments! -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4cade20c.40...@realss.com
Re: [OT] a radar-like tracking device
在 2010-09-30四的 18:20 +0100,Angus Hedger写道: > 183M (ish) less without LoS > http://www.babysecurity.co.uk/products/2077/Loc8tor-Plus-Homing-Tracker-Locator-%26-Personal-Panic-Alarm.html >(UK link) Thanks a lot, this device look like exactly what I need. Too bad the very product, produced in China, are not sold in China. I had to try look for similar devices. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/1285989716.6817.0.ca...@localhost
Re: [OT] a radar-like tracking device
On 2010年09月30日 23:34, Zhang Weiwu wrote: > # If it works outdoor it's enough. No need to use indoor. > # If it can find the 'partner' in 150 meters it's good enough. 300 meter > even better. Longer not needed. In fact, consider the low requirement of the application, a simple device like this will do: 1. have a button on one device 2. have a beep device on the other 3. if I press the button it give a short beep so loud that I can hear in 150 meters Then I will be able to use the nature radar: my hearing ability, to locate the object. It's actually pretty precious, precious for my scenario. With a single beep I have both angel information and distance information. (To not to bother others too much, using a recorded dog bark instead of a beep would be helpful.)
[OT] a radar-like tracking device
Being off-topic I don't know which place better to ask such question. I want to have a radar-like device to track moving object. It should offer me two piece of information: the angel and the distance of the object from me. I want to have the similar thing as the radar of "Conter-Strike" (in game it displays locations of all friendly team members) or the "Motion Detector" as in Halo (in game it displays moving objects near-by). Given the technology available nowadays it's hard to believe such device not existing for consumers, but not knowing the name of such device it's hard for me to Google it out. Most google search lands in GPS tracking devices that offer me a lot of features I don't need. I don't need to see the object on a map, google map or anything, not need to know it's latitude/longitude, and I don't need to see the location on PC, mobile phone and color hand-held display with map on it. I particularly don't need it to work in global scale of 510GigaSquareMeter (surface of the earth), 300 meter coverage would do. So if any one came across such a device can you give me a hint? * It should come in pair, one stick/bind on the thing to be tracked, the other have a radar screen to find its partner. It is not even necessary have a radar screen, a wrist-watch-like or compass-like mechanical pointer thing would do. * If it works outdoor it's enough. No need to use indoor. * If it can find the 'partner' in 150 meters it's good enough. 300 meter even better. Longer not needed. * Both are movable, not fixed on the wall. * The information it provides should be close to real-time, update once per 15 seconds would be enough. Thanks in advance for suggestions and tolerance of off-topic posts. P.S. I also went to local supermarkets, and the things they sell are all GPS devices, usually around 100USD (not cheap in China). Yet the feature list on such devices are everything I don't need. Even worse most of the devices need me to do the math or use a map to calculate the angel between me and the object being tracked, as they are designed heavily map-oriented.
Re: loose access control that works for dynamic IP address
On 2010年09月27日 18:25, Jochen Schulz wrote: > It would help to know what software "runs the website". Are we talking > about Apache2? No. In fact I wanted to abstract the software running on there for a reason: there is a http server (not apache2, but bozohttpd because I am developing a modified version of it for special purpose), a nfsv4 mount daemon, plus an ssh server. The last one doesn't have to be secured this much for obvious reasons. And VPN is not a good candidate because it cannot stand the crazy network in Beijing where tcp connection drops after a while no matter what. On the other hand, both http and nfs handle connection drop rather easily (they simply re-connect). -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4ca0790b.1080...@realss.com
Re: loose access control that works for dynamic IP address
On 2010年09月27日 16:54, Scott Ferguson wrote: > Would dyn-dns help? ahhh, yes. This is exactly what I used. I know how to get dynamic dns running, but need a way to control access to it. Here I re-ask the question in plain language and an improvised example: I have computer A that runs a website. I only want myhost.dyn-dns.com to be able to access this website, others who want to access the website should get denied. How do I configure computer A?
Re: loose access control that works for dynamic IP address
On 2010年09月27日 16:19, Zhang Weiwu wrote: > The problem being the ip address of the FQDN is a dynamic one of the > same host, changing once per three days. > In case I wasn't clear with the above explanation: with dynamic IP address, dns reverse-lookup won't work. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4ca0545c.5050...@realss.com
loose access control that works for dynamic IP address
Hello. I need rather loose security that the server daemon offer services on a TCP port, allow/deny a client's tcp incoming connection based on a FQDN. The problem being the ip address of the FQDN is a dynamic one of the same host, changing once per three days. I know both IP table and tcpd can manage allow/deny rule based on IP addresses, but can they do so with a FQDN that maps to dynamic IP address? Thanks in advance! P.S. I am totally aware of the security risk of authenticating a client based on its FQDN, including being aware of attacks based on DNS spoofing. If you usually insist on either solid security or no security, please kindly ignore this post. Best. Zhang Weiwu -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4ca053a8.4010...@realss.com
Re: port forwarding without using ssh
Hi. On 2009年11月12日 07:53, green wrote: > Zhang Weiwu wrote at 2009-11-10 20:36 -0600: > >> Hello. I have a remote server inside a remote office covered by NAT >> masquerade where port forwarding not possible, and a local server in my >> local office not covered by NAT masquerade. In order to access the >> remote office and hosts in that office, I do this: >> >> On remote office server, in a screen session I run >> $ ssh -R local_server >> >> On my own office, I try to connect to mapped ports on local_server. >> >> The problem of this solution is security. I do not want to grant shell >> access of local_server to remote_server. What would you recommend me to >> do in this case? I could try to limit access of the account used by >> remote server ssh -R, but should I? >> > You might want to check out apf-server and apf-client packages. I use these > to > provide access between masqueraded systems using an intermediary system. > Server runs on the intermediary and client on the system to be connected to. > System connected _from_ connects to client through a port on the server. > Thank you! Now that I tried it, te apf-client package proved very useful in my case. I followed your advice almost a year later because I was too busy with daily business and kept your email as "marked for personal todo" for a year or so. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4c8dd155.3040...@realss.com
Re: text formatting tool that can produce output like ls(1)?
On 2010年08月28日 12:08, T o n g wrote: > You didn't provide a test case so here is mine: (followed by a case using > column) > Thank you very much indeed. I wasn't aware of "column" command. Thank you for your test case as well! Best regards Zhang Weiwu -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4c7b2408.7060...@realss.com
text formatting tool that can produce output like ls(1)?
The output of "ls" is pretty good because: 1. It calculate column width from widest columns. 2. It knows one Chinese ideograph is two letters wide. 3. It aligns columns by flexible space character instead of tab Is there a text formatting command that formats text like "ls" while take user supplied input? If a command "unknown" can do this: $ ls | "unknown" should have the same output as $ ls -- P.S. this is indeed a re-post of previous of my post "expand (1) not useful enough. How about expandest?" but re-written with an example command that more people would be familiar with, a.k.a. ls, hoping to get more attention thus a result:)
Re: expand (1) not useful enough. How about expandest?
On 2010年08月26日 11:02, Zhang Weiwu wrote: > I always want a tool that: > > * Check the whole data file, for each column, find the widest cell. > * expand the data file, use widest cell for each column. > * it should know one ideograph counts two characters wide. > With awk it also can be done, in fact one line: $ printf "ab\tcde\nf\tgh\n" > /tmp/test.tsv $ awk -F $'\t' 'FILENAME != "-" { for (i=1; i<=NF; i++) {max[i] = (length($i) > max[i] ? length($i) : max[i]); }} FILENAME == "-" {for (i=1; i<=NF; i++) { printf("%-" max[i] "s ", $i);;} print "";}' /tmp/test.tsv - < /tmp/test.tsv ab cde f gh But my awk one-liner have the fault that is the Chinese ideograph is counted as one character, not as two character-wide. I don't know a way to fix that yet. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4c77e3ab.6090...@realss.com
expand (1) not useful enough. How about expandest?
Hello. I often create spreadsheet in spreadsheet software (gnumeric, oocalc) and save as Tab-separated value, convert to text format, send it as plain text in email body. Because I hate to require the other person to use spreadsheet software if I just want to present a simple table of less than 5 columns to them. This way you can imagine I use expand(1) a lot. To expand tab-separated text table to plain-text-formatted-with-space. But 1. expand require me to know the column width 2. and each column width must be the same So this is what I do: * The widest column I have is column 4. * The widest cell in column 4 is row 3, it is 12 characters wide. * expand -t 12 I always want a tool that: * Check the whole data file, for each column, find the widest cell. * expand the data file, use widest cell for each column. * it should know one ideograph counts two characters wide. question: is there such a tool? Or do I have to write it myself (using awk)? If I wrote such a tool, I'll call it "expendest", because it expends according to widest data cells in each column. Thanks. Best. Zhang Weiwu
Re: match across line using grep
On 2010年08月07日 06:41, Bob McGowan wrote: > My point is that changing only the LANG environment variable changed the > way 'grep' dealt with the newline character. You are right this really look like a problem. Where should I file the bug? The gnu projects management looks mysterious to me, unlike other foss projects where there is a bug tracker open for every product. Or, should I file it as a Debian bug? -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4c6d3cbc.3070...@realss.com
Re: match across line using grep
On 2010年08月04日 00:57, Bob McGowan wrote: > I would suspect > the regex engine is still honoring '. (dot) does not match newline' > convention but is OK with literals, if present. > It can be a bug in grep implementation. If your theory holds true, the following should match, but it doesn't. $ printf "a\nb" | grep -z 'a[^a]*b' $ Because, if dot does not match newline, like in Java (verified in Java-based JEdit editor), then dot is equal to [^\n] In that case a easy way to workaround it is to replace dot with [^[:something-horribly-non-existent:]] P.S. A interesting design might be: for an RE implementation where dot does not match newline, the very RE implementation should allow [^] to mean really "matches anything". But the java people didn't do so, they introduced "DOTALL" mode, if you enter this mode, dot means anything, otherwise it means [^\n]. This new mode only makes things more complicated to my understanding. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4c5b6c85.7080...@realss.com
Re: match across line using grep
On 2010年08月04日 04:55, Bob McGowan wrote: > In fact, the LC_ names all seem to be specific to things > that would not necessarily impact the regex operation. > It is not totally true. The encoding part might. If it is UTF-8, in theory, [:digit:] should match more than 0-9. It might, for example, mache 一-十 (Chinese digits). -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4c5b6a10.3070...@realss.com
Re: match across line using grep
On 2010年08月03日 17:53, Andre Majorel wrote: >> > $ printf 'a\nb' | grep -zo a.*b >> > >> > (The above should output something /if/ -z would make egrep >> > not consider \n as string terminator. But it has produced no >> > output) >> > But grep -z does. This would seem to be an undocumented > limitation of -o. > No it doesn't. $ printf 'a\nb' | grep -z 'a.*b' $
match across line using grep
I'm grepping a bunch of files each have a segment code that executes a SQL. My problem is that the query spans across several lines and I can't seem to make grep honor (?s) for that. Here's an example: grep --E 'select.*from.*;' . so that matches the following fine: select * from mytable where id=1; however, it does not match the following: select * from mytable where id=1 and name='foo'"; I tried to use -z parameter for grep, which the manual says would make grep not treating \n as line terminator. But it doesn't work neither. A simple test shows I might have misunderstood the use of -z: $ printf 'a\nb' | grep -zo a.*b (The above should output something /if/ -z would make egrep not consider \n as string terminator. But it has produced no output)
Re: change system behavior upon IP address conflict
On 2010年06月26日 23:16, Camaleón wrote: > I am unaware of any specific configuration to prevent this, at least when > using no DHCP server and you manually define the IP address of the network > devices. > Just for your information I heard a solution. IPwatchD is a userland tool (in debian) that can configure a script to run when IP address conflict detected. That should server the need. I need to try it later. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4c27eccb.3030...@realss.com
change system behavior upon IP address conflict
Hello. In case IP address conflict is detected, different system behave differently. I recall in my campus days FreeBSD would ignore it as if IP address conflict never happened, while Windows system would disable eithernet interface for a while and try it later. Having used Debian for a few years I wonder if this behavior is configurable in Debian? And the reconfigurability is related to networkmanager (which doesn't exist in my campus days) or not? Thanks. Best. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4c256a92.2040...@realss.com
Re: (OT) suggestion on terse wording of "IT Helpdesk"
On 2010年05月28日 05:05, Andrei Popescu wrote: > > Yes, and it's an interesting trick you thought of. > > But, wouldn't the CDCSS people all send mail from the same domain? This > way you can just filter on the domain part of the From: e-mail address, > or am I missing something? > But I am also in charge of the web projects of CDCSS and half of the people I deal on their Web projects are also the people I deal with their IT helpdesk needs. In fact, this is a usual situation if you run a small company targeting small customers: you run several types businesses with them, and every one from them work on several types of needs. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4c00d51a.3020...@realss.com
Re: (OT) suggestion on terse wording of "IT Helpdesk"
On 2010年05月27日 12:32, Ron Johnson wrote: > Email headers are the canonical solution for this type of problem. > > However, I can't discover any method by which one can add ad hoc > headers to individual mails using Outlook, Thunderbird or Gmail. > The difficulty is not to add ad hoc header to my email software. It is easy to understand the difficult to add ad hoc header to my users who will send email to me. As explained the tag in email address is to convey information from my user to me. Since my user knows my email address, that is the only place where the tag can be. I can ask my users to include tag in subject but they will not always remember to follow this rule. Imagine this: Hi folks in CDCSS co ltd. I am Zhang Weiwu and will be responsible for supporting your computer use. If you have a problem, please email me (zhangweiwu at realss.com), but don't forget to add the word "CDCSS helpdesk" in the email subject so that I can properly filter this. And compare to this: Hi folks in CDCSS co ltd. I am Zhang Weiwu and will be responsible for supporting your computer use. If you have a problem, please email me zhangweiwu+aid.cdcss at realss.com. It is obvious which works in reality. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4bfe60e9.9070...@realss.com
Re: (OT) suggestion on terse wording of "IT Helpdesk"
On 2010年05月27日 11:43, Stan Hoeppner wrote: > > This is the exact opposite of what I stated. How can you make the above > statement, given my original post? > I feel this is an English problem. I said: > For example, Stan Hoeppner thought the email address is designed to be > readable, duplicating the use of DisplayName. The meaning of that saying is: Stan Hoeppner thought the following: Zhang Weiwu designed his email address to be readable, Zhang Weiwu by doing so duplicated the use of Display name. Stan Hoeppner then suggest: Zhang Weiwu should make the email address simple, and use a different display name than email address. Off topic as it goes, please accept a simple apologize if you find me got you wrong again and end it here:)
Re: (OT) suggestion on terse wording of "IT Helpdesk"
On 2010年05月25日 15:48, Camaleón wrote: > Hard to tell as you are not providing many details :-) Perhaps culture difference does play a role in this. Thanks to wide use of cyrus-imapd and gmail among local technicians, I took it self-evident that the plus symbol in an email address is a tag to trigger processing rule, thus the following email address: Zhang Weiwu the support engineer of Office IT services of ICD SS would trigger processing rule on the server to categorize the email to it_helpdesk request and to categorize it under customer company "icd_ss". When I leave the post, others can easily get all my previous communication context by looking at helpdesk support requests of icd_css. It also makes it easy for a colleague to search other colleagues' email in regarding to helpdesk, since, such emails do not have much privacy concern and are made available for all colleagues. Those emails who might have privacy concern is without plus and tags. I am sorry for thinking +tag use in email address is self-evident, seems I triggered more off-topic discussions. All other replies in the thread assume I use plus symbol for some fancy reasons. For example, Stan Hoeppner thought the email address is designed to be readable, duplicating the use of DisplayName. Camaleón thought the long email address is used to convey information to my recipient instead of for the recipient to convey information to me, thus he suggested Organization MIME field. One may argue we could simply use email address like it_helpdesk.icd_...@realss.com, but the personnel's name also need to be there for a different workflow related reason too long to address here. I think I will just take ... -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4bfdd9e0.2090...@realss.com
Re: (OT) suggestion on terse wording of "IT Helpdesk"
On 2010年05月25日 15:48, Camaleón wrote: > Hard to tell as you are not providing many details :-) Perhaps culture difference does play a role in this. Thanks to wide use of cyrus-imapd and gmail among local technicians, I took it self-evident that the plus symbol in an email address is a tag to trigger processing rule, thus the following email address: Zhang Weiwu the support engineer of Office IT services of ICD SS would trigger processing rule on the server to categorize the email to it_helpdesk request and to categorize it under customer company "icd_ss". When I leave the post, others can easily get all my previous communication context by looking at helpdesk support requests of icd_css. It also makes it easy for a colleague to search other colleagues' email in regarding to helpdesk, since, such emails do not have much privacy concern and are made available for all colleagues. Those emails who might have privacy concern is without plus and tags. I am sorry for thinking +tag use in email address is self-evident, seems I triggered more off-topic discussions. All other replies in the thread assume I use plus symbol for some fancy reasons. For example, Stan Hoeppner thought the email address is designed to be readable, duplicating the use of DisplayName. Camaleón thought the long email address is used to convey information to my recipient instead of for the recipient to convey information to me, thus he suggested Organization MIME field. One may argue we could simply use email address like it_helpdesk.icd_...@realss.com, but the personnel's name also need to be there for a different workflow related reason too long to address here. I think I will just take ... -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4bfdd9d3.4030...@realss.com
(OT) suggestion on terse wording of "IT Helpdesk"
Hello. In our company we use a email naming convention like this: Zhang Weiwu on Holz Project Problem being when a special email address is needed for Office IT, it become too long for many web forms and email clients: Zhang Weiwu the support engineer of Office IT services of ICD SS So what would a *nix Guru make this shorter? I ask here because Debian people, or especially those who find unix style homy, likes terse names. Who else than unix folks that can make such short name like "ls" and "etc"? I thought of "zhangweiwu+ihd.icc...@realss.com", ihd for "IT help desk". I would take that if none better. Chances are the email address will be used for years, thus I think I should be so prudent that I ask on the list. Thanks. Best regards -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4bfb4bc3.9010...@realss.com
device node not created for usb DVD/CD drive
When device is plugged: $ dmesg | tail -n 9 usb 1-4: new high speed USB device using ehci_hcd and address 4 usb 1-4: configuration #1 chosen from 1 choice scsi2 : SCSI emulation for USB Mass Storage devices usb-storage: device found at 4 usb-storage: waiting for device to settle before scanning scsi 2:0:0:0: CD-ROMPLEXTOR DVDR PX-716AL 1.02 PQ: 0 ANSI: 0 CCS scsi 2:0:0:0: Attached scsi generic sg0 type 5 usb-storage: device scan complete check device node: zhangwe...@casablanca:~$ ls /dev/sr* ls: cannot access /dev/sr*: No such file or directory zhangwe...@casablanca:~$ ls /dev/sg* /dev/sg0 Trying to use /dev/sg0 instead of expected /dev/sr0 in "thoggen" (DVD ripping software), I was told /dev/sg0 is not a block device. The following doesn't help # /etc/init.d/udev restart I suspect some kernel module is missing, but being a amateur I don't have a clue how to check which is missing. The box is $ cat /etc/debian_version lenny/sid Kernel is compiled by other amateurs who shared it on the Internet as deb package, as OEM shipped crippled kernel YET standard kernel in debian package wouldn't work thanks for special hardware: $ uname -a Linux casablanca 2.6.27.19-fulong2f #1 PREEMPT Wed Mar 11 07:22:32 CST 2009 mips64 GNU/Linux -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4b9c4943.7010...@realss.com
Re: remove an HTML tag and all its children from commandline
Zhang Weiwu 写道: > Sure. libwww and sgrep are tools, while xpath is a language. I believe I > should try xpath because I might use use it in other places too, but > what tool to use for xpath? Now I think I can answer my own question, partly at least. There is a good tool for xpath that is named xpath. In debian it is in this package: $ apt-file search /usr/bin/xpath libxml-xpath-perl: /usr/bin/xpath An example of using the tool: print the "advertisement" is: $ tidy -q -asxml -utf8 page_07_zh.html | xpath -e '//d...@class="advertisement"]' -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Re: remove an HTML tag and all its children from commandline
Steve Kemp 写道: > > You might enjoy my "html-tool" command which would do the > job for you via: > Thank you very much for mentioning this tool. A first glance it seems this tool is just too wonderful, it is just designed to solve problems like mine. However after I try it what I worry most happened: > The > thing I worry a bit about xpath is: if it normalize or correct HTML > errors, or align it differently, in the output, after I have done the > removal, it would be big a problem for me, because I am a link on the > corporate workflow chain where others rely on poorly made tools and > incorrect and turbulent HTML to do their daily work and I must not break > them by improving the HTML, unless I do not want to keep current > peaceful and lazy life and save time for more valuable sane projects. Unfortunately it does. The output HTML no longer work with the stupid drag-and-drop-html-edit-for-idiot my "web design guy" is using. I am in position of delivering a signed contract, not in evaluating if a contract can be done, this situation means I cannot take html-tool as an option. But I will well keep it in mind to use when feasible! As time is tight I guess I just use the most turbulent solution: adding the following to all HTML pages: .advertisement { display: none; } It is a silly solution that punishes web visitor for web designer's fault. But on the other hand, I think the web designer who made the junk HTML really should not enjoy too much help from me. Maybe I just let it go this way. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Re: remove an HTML tag and all its children from commandline
T o n g 写道: > For not-so-simple tasks, you need not-so-simple tools. Depending on how > much time you'd like to investigate into such not-so-simple tools, take a > look at lib?, sgrep or the xpath language. > Sure. libwww and sgrep are tools, while xpath is a language. I believe I should try xpath because I might use use it in other places too, but what tool to use for xpath? Is there a handy commandline too for it? The thing I worry a bit about xpath is: if it normalize or correct HTML errors, or align it differently, in the output, after I have done the removal, it would be big a problem for me, because I am a link on the corporate workflow chain where others rely on poorly made tools and incorrect and turbulent HTML to do their daily work and I must not break them by improving the HTML, unless I do not want to keep current peaceful and lazy life and save time for more valuable sane projects. I am pretty sure sgrep can solve my problem after glanced the manual, though. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
remove an HTML tag and all its children from commandline
Hello. I believe this is a common case and must have been discussed before on various other forums like awk/sed/regular expression group. However I could not google them out. You would be helping me a lot if you simply point to a reference to a solution. I want to remove all advertisements in my 100 html files. They are pretty neatly classed, like the following: ... However I could not simply do this: s/.*// Because it is too greedy, that matches the "" till the last, which is almost always after the advertisement. If I set it to not to be greedy, it also fail because it stops at the first inside the advertisement. Consider this case that both greedy and non-greedy fail: Our product is the best Contact us now! Greedy output: Non-greedy output: Contact us now! Expected output: The only way to make it right seems to be able to give the replacement / remove expression the ability to "count" the number of it encounters. I could program such thing in C thanks to my college education, but it sounds overkill for such a common task. What would you do in this case? -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Re: de-stunnel possible?
在 2009-12-26六的 19:14 -0500,Celejar写道: > IIUC, stunnel can indeed do what you want: Thank you very much. You are right. I underestimate the tool and didn't go detail enough on it. Thanks a lot! -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
post script file display differently in /every/ viewer
Postscript is always a pain, you can hardly expect it behave the same way. However I had more luck with PDFs. Usually PDF opens the same in all viewers. Here is an example postscript file I fought with it for half a day. It displays differently in every viewer, and print wrongly from every viewer (including directly print using lp(1) of cups, which generates worst print). Here is how it expected to look like, look at the right side small thumbnail: http://realss.6600.org/broken.ps/expected.png The screenshots of different viewer viewing it (file name is the viewers command line executable name) http://realss.6600.org/broken.ps/gv.png http://realss.6600.org/broken.ps/gimp.png http://realss.6600.org/broken.ps/gs.png http://realss.6600.org/broken.ps/evince.png And the original postscript file: http://realss.6600.org/broken.ps/test.ps In most of the time when I have trouble with postscript, the trouble is incorrect side (upside down, rotated etc) and incorrect bounding box / page orientation (landscape especially), both among the ps I generated or received. However I hardly remember any time I receive a PDF and it opens with such problems, in both xpdf and evince. What should I do to get a right "proff sheet style" output? The effort I spent on solving this doesn't worth, making it seems most efficient way is to layout pictures /manually/ in software like inkscape or OpenOffice Draw and print from there. Thanks. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Re: Help Please !
Kwaku Obeng 写道: > I therefore wish to make an appeal to any of you who can send me a > copy of the Debian 5.0 DVD Pack. I can imagine somewhere went wrong during the burning process. However instead of fighting the burning problem it may be easier to skip the problem by just starting with a well-made CD. So I took it as a reasonable request. However Africa is too far away from me. Do you know if you have a Linux user group locally? Just try google "Linux user group" together with the name of the city you live in. They might have plenty Debian CD in stock. Here in Beijing Linux user group distribute a lot of CDs to other people if you just ask them. They don't have it in stock, they just burn it on the sight, but most burns in the right way:) -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
de-stunnel possible?
Hello. I have a case when the client software only speaks non-SSL protocol and wants to access a server that only offer SSL protocol. Image a case when a sensitive server admin only offer IMAPS access to the emails where the email software can only talk plain IMAP, a frequent case in mobile phone IMAP clients. That case is close to my current case. I imagine a daemon listening on imap port (e.g. of localhost) and upon hearing a connection, connects to specific IMAPS server, and forward traffic between both. That kind of daemon should solve my problem. However googling the Internet I only found stunnel, the software that does the opposite, listening on imaps port (e.g. of the server) and upon hearing a connection, connects to specific IMAP server (usually of localhost) and forward the traffic between. Is there a tool does de-stunnel thing? Thanks in advance. Best. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
compiled tsocks not working, how to debug
Hello. I've installed tsocks from package repository and is working fine. Except I had to resolve domain name on the remote end, which is not satisfied. Reading tsocks man page I realized I had to compile tsocks on my own with configuration options --enable-socksdns and --disable-hostnames in order to make tsocks resolve domain name remotely, so I did it, after removed tsocks package. However then I keep getting time out error: $ tsocks wget http://www.g.cn --2009-12-13 23:43:08-- http://www.g.cn/ Resolving www.g.cn... 203.208.37.104, 203.208.37.99 Connecting to www.g.cn|203.208.37.104|:80...23:46:18 libtsocks(7687): Error 110 attempting to connect to SOCKS server (Connection timed out) failed: Connection timed out. Connecting to www.g.cn|203.208.37.99|:80... ^[Oc23:49:27 libtsocks(7687): Error 110 attempting to connect to SOCKS server (Connection timed out) failed: Connection timed out. Retrying. --2009-12-13 23:49:28-- (try: 2) http://www.g.cn/ Connecting to www.g.cn|203.208.37.104|:80... 23:52:37 libtsocks(7687): Error 110 attempting to connect to SOCKS server (Connection timed out) failed: Connection timed out. Connecting to www.g.cn|203.208.37.99|:80... netstat -t shows this: $ netstat -t | grep socks tcp0 1 localhost:42899 localhost:socks SYN_SENT Naturally I doubt the socks server is broken (it is actually "ssh -D 1080 ..."), but it works fine with Firefox configured to use socks proxy, it also worked fine with Debian-packaged tsocks. And, if the configuration is in effect, being able to resolve domain showed connection to socks server is OK. I am not experienced in networking stuff, so I wonder what would you do from here. Overhearing socks traffic? Or report a bug? I should have discussed this on tsocks forum but having noticed there are about 2 posts per year and some questions gets unanswered (e.g. "is the development stopped?") for years, I think I might try luck at OS-distribution's list. Thanks in advance. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
font available in fc-list but not in xlsfonts
Hello. I recently installed Droid font from Google Android project. The font is then usable in most recent applications except traditional x11 applications. I then found fc-list can list this font but it does not appear in the output of xlsfonts. I first tried to install ttf-droid_1.00~b112+dfsg-0ubuntu1_all.deb and then tried the manual way: to unpackage the font to /usr/share/truetype/droid and add this path to FontPath in /etc/X11/xorg.conf. In both way I got the same result. zhangwe...@casablanca:~$ xlsfonts |grep -Ei 'droid.?s' zhangwe...@casablanca:~$ fc-list |grep -Ei 'droid.?s' Droid Sans:style=Regular Droid Serif:style=Bold Droid Sans Fallback:style=Regular Droid Sans:style=Bold Droid Sans Mono:style=Regular Droid Serif:style=Italic Droid Serif:style=Bold Italic Droid Serif:style=Regular What could be the cause and what should I check next? Thanks. By comparison Dejavu fonts works fine: zhangwe...@casablanca:~$ fc-list |grep -Ei 'dejavu.?s' | head DejaVu Serif,DejaVu Serif Condensed:style=Condensed,Book DejaVu Serif,DejaVu Serif Condensed:style=Condensed Bold Italic,Bold Italic DejaVu Serif,DejaVu Serif Condensed:style=Condensed Bold,Bold DejaVu Sans,DejaVu Sans Condensed:style=Condensed Oblique,Oblique DejaVu Sans Mono:style=Bold Oblique DejaVu Serif:style=Bold Italic DejaVu Sans:style=Bold Oblique DejaVu Sans:style=Oblique DejaVu Sans Mono:style=Oblique DejaVu Sans,DejaVu Sans Condensed:style=Condensed Bold Oblique,Bold Oblique zhangwe...@casablanca:~$ xlsfonts |grep -Ei 'dejavu.?s' | head -dejavu-dejavu sans mono-bold-o-normal--0-0-0-0-c-0-iso10646-1 -dejavu-dejavu sans mono-bold-o-normal--0-0-0-0-c-0-iso8859-1 -dejavu-dejavu sans mono-bold-o-normal--0-0-0-0-c-0-iso8859-15 -dejavu-dejavu sans mono-bold-o-normal--0-0-0-0-c-0-iso8859-2 -dejavu-dejavu sans mono-bold-o-normal--0-0-0-0-c-0-iso8859-7 -dejavu-dejavu sans mono-bold-o-normal--0-0-0-0-c-0-iso8859-9 -dejavu-dejavu sans mono-bold-o-normal--0-0-0-0-c-0-koi8-r -dejavu-dejavu sans mono-bold-o-normal--0-0-0-0-m-0-iso10646-1 -dejavu-dejavu sans mono-bold-o-normal--0-0-0-0-m-0-iso8859-1 -dejavu-dejavu sans mono-bold-o-normal--0-0-0-0-m-0-iso8859-15 -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Re: port forwarding without using ssh
Alex Samad wrote: > On Wed, Nov 11, 2009 at 10:36:20AM +0800, Zhang Weiwu wrote: > >> The problem of this solution is security. I do not want to grant shell >> access of local_server to remote_server. What would you recommend me to >> do in this case? I could try to limit access of the account used by >> remote server ssh -R, but should I? >> > > have you thought about openvpn and iptables? > I am a clueless guy in regarding to both. Would be better if you are more specific which feature of the two software are useful, then I can be more specific when RTFM. Knowing it is possible with certain technology makes better use of time as I have too much pressure at the time to deal with all problems that try to make best use of learning time.. Sorry... -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
what exactly is resident set size in /etc/security/limit.conf and ulimit -m?
Having read the manual and examples on the Internet, still confused. Some suggest it is the limit of a session (as http://www.svantech.com/node/4. * Was it the size limit of a single process? * Was it the size limit of a single session? * If it is for a session, what counts a session? Is a single login to gnome-session a session? Is every terminal window I open in xterm a session? Is it a login session or a shell session? or a screen session? So if I set rss to 1GB, does it mean I can use 2GB if I run two 1GB-sized program each in a separate xterm window? I believe those who knows how kernel works has the right assumption of what 'session' is, but that is not obvious to users who use command line mostly on user-space. Please hint! Thanks. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
port forwarding without using ssh
Hello. I have a remote server inside a remote office covered by NAT masquerade where port forwarding not possible, and a local server in my local office not covered by NAT masquerade. In order to access the remote office and hosts in that office, I do this: On remote office server, in a screen session I run $ ssh -R local_server On my own office, I try to connect to mapped ports on local_server. The problem of this solution is security. I do not want to grant shell access of local_server to remote_server. What would you recommend me to do in this case? I could try to limit access of the account used by remote server ssh -R, but should I? -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
run ssh as service for port forwarding
Hello. We have a great firewall that scans keywords on tcp connections' raw data, thus I could not use my http proxy server outside of the firewall because both direct connection to the web server and in-direct connect to the http proxy are scanned by the firewall. My trick is to run 'ssh -L' and configure browser to use http proxy server that runs on localhost, which forwards to the real http proxy server. However runs ssh -L several times a day is against basic principle of using computer: let computer does the repeating task. autossh helps but it also occupies a console session which I don't like. I thought about wrapping the proxy server with stunnel, but then I could not configure Firefox to connect to http proxy using https protocol. Then I think running autossh -L as a system service (not possible because it doesn't detach from console). What would you recommend then? (TOR is already being used but hardly acceptable for very low bandwidth it offers) -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org