World: r3wp
[Linux] group for linux REBOL users
older newer | first last |
Graham 30-Mar-2008 [2078] | or do I need to use a shell script ? |
BrianH 30-Mar-2008 [2079] | If you know what the target file is, then you can overwrite it if you have the permissions. Finding out what the target file is may need a shell command though. |
Graham 30-Mar-2008 [2080x2] | I can overwrite it while I'm running it? |
Windows won't allow that for encapped apps. | |
Anton 31-Mar-2008 [2082x2] | A test in which RM is used to delete itself. $ which rm /bin/rm $ mkdir test $ cp /bin/rm test/ $ cd test $ ls -l total 36 -rwxr-xr-x 1 anton anton 34600 2008-03-31 16:43 rm $ ./rm rm $ ls -l total 0 |
So it looks quite possible for a binary to delete the file it came from. I'm using Kubuntu. | |
Gabriele 31-Mar-2008 [2084x2] | yes, in most operating system you can unlink a file while it's being used. the file will disappear from the directory structure but will still be taking space on disk as long as it's being used. as soon as all the references to it go away, the disk space is freed. |
of course Windows has to be an exception. | |
Anton 1-Apr-2008 [2086x3] | Does anyone have any methods for limiting process resource utilization ? I have two situations in linux where (single-core) CPU is maxxed out, which makes it very slow to manipulate desktop environment, open process manager etc. The first case is Thunderbird, which maxxes cpu sometimes. The second case is developing with rebol linux build. It sometimes goes ballistic, eating memory like there's no tomorrow. Pretty soon the system is paging madly and it's very difficult to analyse the situation and shut it down. |
My first solution is to use Monit to monitor a particular process and automatically take action when it uses too much memory etc. | |
Anybody tried something else ? | |
Oldes 1-Apr-2008 [2089x2] | yes... I call stats quite often.. it's part of my test function which also counts time required to eval the script I test. If there is momory is expanding, I know, that something is wrong in the script quite soon. (but I code almost in core, in view it can be more difficult) |
but maybe it's not exactly what you want:) | |
Kaj 1-Apr-2008 [2091x2] | Use Syllable. :-) It gives scheduling priority to the user interface |
We've had bugs with some applet using 100% CPU that people didn't notice for a long while because it didn't affect operation :-) | |
Anton 1-Apr-2008 [2093x2] | stats - inside rebol. Hmm.. that could help sometime, but I'm looking for something that can restrict any linux app. |
I just read about AppArmor being used more in Ubuntu 8.04 HardyHeron. I will look into that. | |
btiffin 1-Apr-2008 [2095] | Anton; look at nice |
Anton 1-Apr-2008 [2096] | Good idea, I will see how nice changes things. |
btiffin 1-Apr-2008 [2097] | And priocntl may help too |
Anton 1-Apr-2008 [2098x2] | Kaj, that is a good feature. |
I'll look at priocntl too. | |
btiffin 1-Apr-2008 [2100] | But a user-oriented scheduler versus a server-oriented scheduler (as Kaj mentioned with Syllable already on the crest) will be the next wave in Desktop Linux, umm, I hope. |
Kaj 2-Apr-2008 [2101x5] | We've been hearing that and similar claims for a decade |
Improving one segment of a chain, even if it's the weakest one, only exposes the next-weakest | |
A scheduler is not much use if the rest of the system doesn't present meaningful pieces to schedule | |
Major apps like Thunderbird and REBOL effectively locking the rest of the system means that the system is not meaningfully handling apps in a concurrent way, so I would venture to say that the scheduler has very little if any effect on this | |
In fact, Syllable used to have a very primitive scheduler and was already as responsive as now, except for some corner cases | |
Anton 4-Apr-2008 [2106x3] | Does mounting a filesystem change anything on the filesystem ? I'm on Kubuntu and I've taken a new laptop's 80GB internal disk into an external drive enclosure and connected it via USB to my computer. Kubuntu detected it and automounted the filesystem. My task was to duplicate the disk, in the pursuit of which I've used various combinations of dd and gzip. However, I can't get a straight 80GB image to compare equally (using cmp or diff) with a compressed image. (I decompress the compressed image on the fly and pipe it into cmp.) After many hours, it occurs to me that having the filesystem mounted might be changing it slightly over time... which would make my images different. (This would make my mission a failure, as I wanted a pristine image.) So can anyone answer the above question ? |
From the depths of my memory comes a blurry message from someone who did this exact thing... I think I should have made sure not to automount it, and only mount it read-only. :-/ | |
But the evidence collected so far does not support this theory strongly, actually... Hmm... It's confusing. | |
btiffin 4-Apr-2008 [2109] | Linux does track accesstime to files. So, I'd wouldn't be surprised if mounting doesn't touch at least a few bits. |
Anton 4-Apr-2008 [2110] | Yes... (damn)... this discussion of atime agrees with that http://lwn.net/Articles/244829/ |
btiffin 5-Apr-2008 [2111] | I'm a little bit confused; I didn't read the dd and gzip part until just now. You want a compressed mirror? I don't think that will ever cmp true to the original. dd will include partition table info that is normally "invisible to the naked eye". Including that in the compressed file doesn't give dd the chance to dump the invisible bits back into invisible places. Or am I more than just a little bit confused? Maybe Kaj will come by shortly and fill us in with the technicals instead of the voodoo. :) |
Gabriele 5-Apr-2008 [2112] | if it's journaled, mounting it will probably change the journal. also, mounting it will surely change a flag in the filesystem. you need to mount it read only. |
Anton 5-Apr-2008 [2113] | Yes, this all makes sense in retrospect, now. Thanks for the confirmation. |
Kaj 5-Apr-2008 [2114x5] | Mounting it on juggernauts like (K)Ubuntu is also likely to unleash automatic indexing tools on the partition |
Unless I'm very mistaken, you don't have to mount a disk to dd it, as dd works on bare disk blocks | |
Otherwise, indeed mount it read-only | |
For backup purposes, be aware that dd-ing a partition mounted read-write is likely to result in a more or less inconsisten state of the backup, as data is changed on the partition at the same time, and dd has no knowledge of the file structure | |
Also, you would only be able to restore the dd backup to a disk of exactly the same size | |
Anton 5-Apr-2008 [2119x3] | Kaj, you're right. dd works at device level. After practising my mount skillz, I can automount it 'ro', so this is looking good. (There is only a HAL error to deal with now, during unmount.) |
(sorry, HAL error, during "Safely remove"). | |
(I umount it myself) | |
Anton 9-Apr-2008 [2122] | I have sshd running on my Kubuntu, and when I fish: across to it from another kubuntu box on the local network, it takes a long time to connect. Today I counted 45 seconds before authentication dialog popped up. I think I remember reading something about a delay for encryption etc. but I'm wondering if that's a "normal" length of time to wait. |
btiffin 9-Apr-2008 [2123] | 45 seconds seeems long. My nodes usually (including Dev - old) in under 4. One point; you set no root login in /etc/ssh/sshd_config ? Otherwise brute force password attackers will try, and try, and try... I'm not sure why ssh ships with root login enabled. If an admin is remote configuring a bunch of nodes, let them configure it to allow; ti shouldn't be a default imho. |
Anton 10-Apr-2008 [2124] | Thanks Brian, I will investigate further this delay. I have a long password, so brute force attackers should be kept at bay. |
NormanDep 11-Apr-2008 [2125] | Anton.. dont be fooled by thinking your ssh password is save.. the remote root user knows it anyway... ;-) |
Anton 11-Apr-2008 [2126x2] | :-) |
That's true, actually, the remote computer could be compromised and then keylog me. But I set up the "remote" computer, being my flatmate's in the next room. I can't remember if our firewall allows ssh between local and wide area network... | |
older newer | first last |