Re: Scripting, UPS Selection, etc.
On Sat, 25 Oct 2008, in the Usenet newsgroup alt.os.linux.mandriva, in article
<ge0o69$221$1@registered.motzarella.org>, Adam wrote:
[color=blue]
>Moe Trin wrote:[/color]
[color=blue][color=green]
>> There are several problems here. Official release of what? The
>> distribution? The application or package?[/color]
>
>The newest versions of applications seem to be available from the app's
>web site quite a while before they're included in the distro
>repositories.[/color]
That varies a bit. Sometimes you do find bleeding edge stuff that is
only there because of version number chasing.
[color=blue]
>And many apps don't seem to be on the Mandriva repositories (I don't
>expect them to have EVERYthing), but install and run without much
>problem.[/color]
I tend not to be concerned much about the stuff that comes with the
distributions. I do have a number of applications that virtually no
distribution (or very few) carry - either as "standard" or as the
exciting "optional" packages. This means I tend to spend some time
compiling stuff that I need, but isn't part of the distribution, and
probably isn't available in a (compatible) packaging system.
[color=blue]
>(Actually I've spent the past week and a half adding to my personal
>'fortune' data files. Not really useful, but I found some good ones
>to add. Fortunately my enthusiasm for that is waning, and I can get
>on to something more productive.)[/color]
Nothing wrong with getting the fortunes file up to date - it's good
for morale.
[color=blue]
>I mentioned the unwritten general computer solution list to my
>mother... she asked for it, so I think it goes something like this, in
>this order:
>
>1) RTFM
>2) Reboot or power cycle
>3) Google search for problem
>4) Update to newest version
>
>I'm sure someone will come up with a better one.[/color]
I tend to do 1), 3), 2) (except that using *nix, this usually means
shutting down the application and re-starting it, rather than a
reboot), and 4) is also pretty rare, as this is done on a regular
basis anyway.
[color=blue]
>Several emails and one phone call from India later, HP is going to
>FedEx me a new DVD+/-R/RW drive, then I have to send back the
>defective drive at their expense. Thanks for the original suggestion;
>I assumed I'd have to lug the whole system somewhere and wasn't going
>to bother. I guess this is an advantage of a "name brand" system with
>a warranty... it's the first time I've had a "name brand" system since
>1998.[/color]
I can't remember the last time I've had something with a warranty still
in force. Much of what I use is "pre-owned" and even if it is a name
brand (the company buys from the local box-shifter, so only the parts
tend to have names anyone has heard of).
[color=blue][color=green]
>> None of my systems have more than two internal drives.[/color]
>
>Do you mean two internal HDs, or are you counting optical drives?[/color]
Drives. It's mainly one hard and one optical, but there are also
several systems with two hard drives and nothing else.
[color=blue][color=green][color=darkred]
>>> I'm thinking ahead to what could be transferred to my next system
>>> in several years.[/color]
>>
>> Will they be _worth_ transferring?[/color]
>
>That is a good point. However, (a) I could get my next system sooner
>than that, and (b) even if a HD is uselessly small, I can use it for
>migrating data to the new system.[/color]
The "original" drives in an old system then to be less useful. They
are getting old, and tend to be tiny. Replacement drives that are
added to an old system tend to be more useful. Now admittedly in
some areas I'm stretching things - for example, the firewall box has
a 213 Meg Maxtor that is ancient, but quite adequate for it's job.
The other systems have drives from 2.6 Gigs to 100 Gigs, and Friday
I replaced one of the 8.4 Gig drives with a 500 Gig drive, though at
the moment there isn't much on it.
[color=blue]
>I hope I'm making sense... sorry if I'm rambling; it's getting late.[/color]
Part of what you are doing it _thinking_ about things, and this is
going to make it a lot better when you do move on. Keep talking!
Old guy
Re: Scripting, UPS Selection, etc.
Moe Trin wrote:[color=blue][color=green]
>> The newest versions of applications seem to be available from the app's
>> web site quite a while before they're included in the distro
>> repositories.[/color]
>
> That varies a bit. Sometimes you do find bleeding edge stuff that is
> only there because of version number chasing.[/color]
I got OpenOffice.org 3.0.0 from the OO.o website and installed it with
no problem, then discovered it barfed opening *.rtf files, so I got 2.x
from the Mandriva repository. Gotta file a bug report about that, and
I'll try again in a version or two.
[color=blue]
> Nothing wrong with getting the fortunes file up to date - it's good
> for morale.[/color]
The best one I've added is:
"We can always turn it into a lamp."
(Philippe Jullian, "The Collectors")
'fortune' seems to get confused if you specify any percentages and they
don't add up to exactly 100%, even though the man page says otherwise.
Gotta look into that someday.
[color=blue][color=green]
>> I mentioned the unwritten general computer solution list to my
>> mother... she asked for it, so I think it goes something like this, in
>> this order:
>>
>> 1) RTFM
>> 2) Reboot or power cycle
>> 3) Google search for problem
>> 4) Update to newest version[/color]
>
> I tend to do 1), 3), 2) (except that using *nix, this usually means
> shutting down the application and re-starting it, rather than a
> reboot), and 4) is also pretty rare, as this is done on a regular
> basis anyway.[/color]
My parents are usually running WinXP (still trying to persuade them to
install Ubuntu dual-boot), so rebooting fixes a lot of problems. And it
doesn't update apps automatically. They switched ISPs from the one I'd
been using that always dropped connections (for them too) to NetZero
which is cheaper and doesn't drop connections but requires a proprietary
IE that crashes whenever I use it, so I figure getting the newest
version of that might help. NetZero also has a proprietary .deb browser
package for Ubuntu, but I haven't played with it.
[color=blue]
> I can't remember the last time I've had something with a warranty still
> in force.[/color]
HP sent me a new DVD burner which tests OK... different brand but
functionally equivalent, except the new one seems less likely to create
coasters. Now I have to send the defective one back, at their expense.
I think I'll try it for a while, and add the one I bought from NewEgg
to my parts collection.
[color=blue][color=green][color=darkred]
>>> None of my systems have more than two internal drives.[/color]
>> Do you mean two internal HDs, or are you counting optical drives?[/color]
>
> Drives. It's mainly one hard and one optical, but there are also
> several systems with two hard drives and nothing else.[/color]
I was going to add an elderly PATA DVD-ROM drive as a second optical
drive, since I already had the drive and cable, but (a) it would have
blocked airflow and stretched cables, (b) I painted its beige faceplate
black to match (yes I took it off first!) and results looked amateurish,
and (c) I broke its tray-opening mechanism when putting the faceplate
back on. Also, a second optical drive wouldn't let me do anything more,
though it would make some things easier to do.
[color=blue]
> The "original" drives in an old system then to be less useful. They
> are getting old, and tend to be tiny.[/color]
True, but I find they make migration easier -- just hook up the old
drive and copy the files over.
[color=blue]
> Part of what you are doing it _thinking_ about things, and this is
> going to make it a lot better when you do move on. Keep talking![/color]
Thanks! It did help. I kind of decided to leave this box with just the
one (replacement) optical drive and the one internal HD (120 GB). As I
mentioned, the PATA DVD-ROM drive is in the garbage and the DVD burner I
just bought from NewEgg goes into the closet. The front panel drive bay
covers on this machine are knockouts, not snap-ins, and I'd removed one
when trying several optical drives as stopgaps, so putting it back in is
a messy business involving improvisation and epoxy glue. I'm also /not/
going to add another internal HD, thus leaving my one remaining empty
PCI slot free. When I can get a nice, reliable, quiet external USB 1 TB
HD for $100, I'll add that. Prices are definitely heading that way.
If anybody has any suggestions on drive configurations, drive models, or
even good additions to the 'fortune' database, I'd like to hear them!
Adam
Re: Scripting, UPS Selection, etc.
On Wed, 29 Oct 2008, in the Usenet newsgroup alt.os.linux.mandriva, in article
<geanln$rqm$1@registered.motzarella.org>, Adam wrote:
[color=blue]
>'fortune' seems to get confused if you specify any percentages and
>they don't add up to exactly 100%, even though the man page says
>otherwise. Gotta look into that someday.[/color]
Assuming you are choosing "50 % group_x 40 % group_y" is there another
group (group_z) to allow it to default to "the rest".
[color=blue]
>My parents are usually running WinXP (still trying to persuade them to
>install Ubuntu dual-boot), so rebooting fixes a lot of problems.[/color]
Ack'ed
[color=blue]
>And it doesn't update apps automatically.[/color]
But does the system get _any_ updates? No O/S (or application) is
perfect, and patching/updating is _usually_ desirable. Yes, I'm
aware of some of the undesirable features that microsoft may add "to
improve your Internet experience", but that's a trade-off that has to
be considered.
[color=blue]
>They switched ISPs from the one I'd been using that always dropped
>connections (for them too) to NetZero which is cheaper and doesn't
>drop connections but requires a proprietary IE that crashes whenever
>I use it, so I figure getting the newest version of that might help.
>NetZero also has a proprietary .deb browser package for Ubuntu, but
>I haven't played with it.[/color]
At one time, they were a free ISP, and you "paid" for the service by
being flooded by banner ads. Then they went further, and if you weren't
downloading the ads within the ads, the connection stalled. I imagine
their proprietary browser is to make sure you see the ads. "There is
no such thing as a free lunch."
[color=blue]
>I was going to add an elderly PATA DVD-ROM drive as a second optical
>drive, since I already had the drive and cable, but (a) it would have
>blocked airflow and stretched cables, (b) I painted its beige
>faceplate black to match (yes I took it off first!) and results
>looked amateurish, and (c) I broke its tray-opening mechanism when
>putting the faceplate back on. Also, a second optical drive wouldn't
>let me do anything more, though it would make some things easier to
>do.[/color]
Such as? (below)
[color=blue][color=green]
>> The "original" drives in an old system then to be less useful. They
>> are getting old, and tend to be tiny.[/color][/color]
[color=blue]
>True, but I find they make migration easier -- just hook up the old
>drive and copy the files over.[/color]
That's a onezie situation. I would suggest you consider having (or
setting aside the old system as) a second system. You don't have to be
running it all the time, but this can add a rapid backup service.
The other advantage is if you get an application that wedges the
system you are using. You can then fire up the other system, and reach
in via SSH (or even telnet if it's restricted to local access only)
and do what might be necessary - including killing off applications
(kill -15 is the "please shut down cleanly", while "kill -9" is
much more violent and less clean), and rebooting WITHOUT the trauma
of yanking the power (with possible resulting file corruption).
[color=blue][color=green]
>> Part of what you are doing it _thinking_ about things, and this is
>> going to make it a lot better when you do move on. Keep talking![/color]
>
>Thanks! It did help. I kind of decided to leave this box with just
>the one (replacement) optical drive and the one internal HD (120 GB).
>As I mentioned, the PATA DVD-ROM drive is in the garbage and the DVD
>burner I just bought from NewEgg goes into the closet.[/color]
That's the whole idea. The more "what if's" you are exposed to, the
more choices you have.
[color=blue]
>The front panel drive bay covers on this machine are knockouts, not
>snap-ins, and I'd removed one when trying several optical drives as
>stopgaps, so putting it back in is a messy business involving
>improvisation and epoxy glue.[/color]
What, you outta duct tape? ;-)
[color=blue]
>I'm also /not/ going to add another internal HD, thus leaving my one
>remaining empty PCI slot free. When I can get a nice, reliable, quiet
>external USB 1 TB HD for $100, I'll add that. Prices are definitely
>heading that way.[/color]
I'm somewhat less concerned with 'quiet', but the idea of external
drives is appealing. Provided they are physically secure (don't
leave them where you can accidentally kick them, or be in the way of
the cat's tail), they're going to run cooler, and be easier to remove
or isolate for backup purposes.
Old guy
Re: Scripting, UPS Selection, etc.
On Sun, 02 Nov 2008, in the Usenet newsgroup alt.os.linux.mandriva, in article
<gellps$nao$1@registered.motzarella.org>, Adam wrote:
[color=blue]
>Moe Trin wrote:[/color]
[ISP selection guides]
[color=blue]
>Thanks, I'll take a look at those... especially ones that do NOT
>require a proprietary browser! Like many of the folks here, I am
>unofficial "tech support" for family, relatives, and friends.[/color]
I don't know of that many that do. They may want you to make their
web page your home page in the browser, but unless they make it a
requirement (which I haven't seen many do), they can't complain if
you don't.
[color=blue][color=green]
>> That's a local decision. Twice in three years isn't a very high
>> probability of need, so I might consider the drive as more important.[/color]
>
>When I get closer to a purchase, I'll ask here and the LUG for
>suggestions. Neither is urgent. And I just paid for body work on my
>car, so I'll let my finances recover first.[/color]
Know about that little problem. I know I've got some medical work due,
and have to accumulate the deductibles.
[color=blue][color=green]
>> Note also that there are minimalists UPS' that lack auto-shutdown
>> or similar (you'd have to initiate the shutdown manually) for less
>> than $100. They're meant to give you time to shut down the system
>> cleanly right away, or ride through short (few seconds to tens of
>> seconds) outages. If it's going to be used on a system that is only
>> running when you are at the console, that may be an acceptable
>> trade-off.[/color]
>
>That might be acceptable, but do they cost significantly less?[/color]
Yes, because they lack the automatic features AND lack the running time
and horsepower of the APCs you were looking at earlier.
[color=blue]
>One thing I have to deal with that you don't is the change back to
>Standard Time.[/color]
Not directly - but the rest of the world doing strange things with
their clocks does impact me. As long as your timezone files are kept
more-or-less up to date (the last time anything in the US changed was
back in tzdata2007g from August 2007 when a couple of counties in
Indiana played musical timezone names), things should happen pretty
much automagically. The latest timezone file (tzdata2008i from last
Monday) has some date changes for Argentina only.
[color=blue]
>To my pleasant surprise, Mandriva 2008.0's cron handled it exactly the
>way I would have wanted it to. Here's an excerpt from my cron.hourly
>job (date, uptime, free, hddtemp, sensors):
>
>Sun Nov 2 00:01:02 EDT 2008
>Sun Nov 2 01:01:01 EDT 2008
>Sun Nov 2 01:01:01 EST 2008
>Sun Nov 2 02:01:04 EST 2008
>Sun Nov 2 03:01:02 EST 2008[/color]
I didn't think you were running 24/7.
[color=blue]
>I added a comment to /etc/crontab:
>
># do NOT use times from 01:00 to 03:00 because of change to/from DST[/color]
That's probably the simplest solution. You MAY be able to set things
to run on UTC (via environmental variables), but that's often a bad
solution worse than the problems it attempts to solve. It also
depends on which cron daemon you are using - there are several, and
each has it's own warts.
[color=blue]
>I figured this was as good a time as any to get ntp working, and change
>the system clock to GMT.[/color]
'system clock'? Do you mean the CMOS? Or running the system itself
such that 'date' and 'date -u' report the same time? Setting the
hardware (CMOS) clock to UTC is desired, but by no means mandatory. If
you do leave the hardware clock on "localtime", you need to reset it
in a time change, but that's not all that hard to do. I simply have a
cron task that uses /sbin/hwclock to set the hardware clock daily
11 3 * * * root /sbin/hwclock --utc --systohc
as the system (kernel) time is kept reasonable by a time sync to the
company time servers (or you could use ntp from the pool servers).
That's probably over-kill, as there are few things happening that need
time accurate to a fraction of a second.
Old guy
Re: Scripting, UPS Selection, etc.
Moe Trin wrote:[color=blue][color=green]
>> And I just paid for body work on my
>> car, so I'll let my finances recover first.[/color]
>
> Know about that little problem. I know I've got some medical work due,
> and have to accumulate the deductibles.[/color]
Right now I'm thinking that early next year I should be able to afford a
1 TB USB HD. The 120 GB internal HD is more than enough for several
distros + applications + /home. The external HD would hold downloads,
data, and virtual machines.
Two questions to anybody: I've read that accessing data at the outer
tracks of a HD is faster than at the inner tracks. With current drives,
is there really much difference? And if there is a significant
difference, does Mandriva partition by cylinder or by head? "By
cylinder" meaning that /dev/sda1 starts on an outer track on all heads,
and "by head" meaning that /dev/sda1 is entirely under head 0 until that
surface is filled?
[color=blue][color=green][color=darkred]
>>> Note also that there are minimalists UPS' that lack auto-shutdown
>>> or similar[/color]
>> That might be acceptable, but do they cost significantly less?[/color]
>
> Yes, because they lack the automatic features AND lack the running time
> and horsepower of the APCs you were looking at earlier.[/color]
Unless they're a LOT cheaper, I'd rather wait and get a UPS with
everything I need (I figure $100), rather than spend less for a stopgap,
especially as the need doesn't seem to be urgent.
[color=blue]
> I didn't think you were running 24/7.[/color]
I'm not. Basically I power down when I go out, and power up when I get
back home, so it's usually on all night, but with the CRT monitor
switched off to save power and wear. Also occasionally I boot other
distros or OSs, so Mandriva isn't necessarily running all the time it's on.
[color=blue][color=green]
>> I figured this was as good a time as any to get ntp working, and change
>> the system clock to GMT.[/color]
>
> 'system clock'? Do you mean the CMOS? Or running the system itself
> such that 'date' and 'date -u' report the same time? Setting the
> hardware (CMOS) clock to UTC is desired, but by no means mandatory.[/color]
I wasn't clear. The hardware clock is now set to UTC instead of local
time, but the time displayed is still local time.
Also, to get ntp working I had to enable port 123 in my router, and I
couldn't remember the admin password, so I had to do a hardware reset on
it and reinstall VZ's Windows software. Oh well. Then I explicitly
enabled port 123, and now ntp works and sets the hardware clock when
Mandriva boots.
Adam
Re: Scripting, UPS Selection, etc.
On Fri, 07 Nov 2008, in the Usenet newsgroup alt.os.linux.mandriva, in article
<gf2q2h$r6n$1@registered.motzarella.org>, Adam wrote:
[color=blue]
>Moe Trin wrote:[/color]
[color=blue]
>Two questions to anybody: I've read that accessing data at the outer
>tracks of a HD is faster than at the inner tracks. With current drives,
>is there really much difference?[/color]
Yes and no. You've got a copy of 'Upgrading and Repairing PCs' from
Scott Mueller - look in the index for 'zoned bit recording'. There can
be a 2:1 difference inn the data transfer rate between inner and outer
tracks. But the question becomes 1) what else is on the disk (other
partitions in use), and 2) is the transfer rate limited for other
reasons, such as the system trying to write to the video, network, or
some other time-waster?
[color=blue]
>And if there is a significant difference, does Mandriva partition by
>cylinder or by head? "By cylinder" meaning that /dev/sda1 starts on
>an outer track on all heads, and "by head" meaning that /dev/sda1 is
>entirely under head 0 until that surface is filled?[/color]
That would be a function of the disk driver, and I don't know of anyone
who does anything other than by cylinder. The inefficiency of any other
scheme is just to great.
[color=blue][color=green]
>> Yes, because they lack the automatic features AND lack the running
>> time and horsepower of the APCs you were looking at earlier.[/color]
>
>Unless they're a LOT cheaper, I'd rather wait and get a UPS with
>everything I need (I figure $100), rather than spend less for a
>stopgap, especially as the need doesn't seem to be urgent.[/color]
As your rate of outage is low, I'd agree with you.
[color=blue][color=green]
>> I didn't think you were running 24/7.[/color]
>
>I'm not. Basically I power down when I go out, and power up when I
>get back home, so it's usually on all night, but with the CRT monitor
>switched off to save power and wear. Also occasionally I boot other
>distros or OSs, so Mandriva isn't necessarily running all the time
>it's on.[/color]
As long as the number of outages you have isn't causing grief, then
there is little reason to worry. One thing to think about is those
cron-jobs. You _might_ want to look at the times, and then look at
the other type of cron daemon. The "standard" type, exemplified by
Vixie-cron, Dillon-cron, or BSD-cron is meant for 24/7 systems. If the
system isn't in multi-user mode at the appointed hours, those cron jobs
scheduled at that time are not run. The "other" type of daemon is
used by 'anacron', fcron' and 'ucron'. Typically, these can't schedule
a job to run at a specific time, but they try to run daily jobs once
in a 24 hour period (if powered up obviously), weekly jobs once in a
seven day period, monthly jobs once in any month, and so on. They do
this by checking a table to see when the job was last run, and if it
hasn't been run in the scheduled interval, it is run (essentially) now.
That 'now' is usually some delay after the system gets powered up.
[color=blue]
>I wasn't clear. The hardware clock is now set to UTC instead of local
>time, but the time displayed is still local time.[/color]
From 'man hwclock'
--utc Indicates that the Hardware Clock is kept in Coor-
dinated Universal Time. It is your choice whether
to keep your clock in UTC or local time, but noth-
ing in the clock tells which you've chosen. So
this option is how you give that information to
hwclock.
If you don't specify --utc when you should, or vice versa,
both setting and querying of the Hardware Clock will be
messed up.
That flag is controlled by some file in /etc/ (varies by distribution)
but it sure can be fun when the distribution is being overly helpful.
[color=blue]
>Also, to get ntp working I had to enable port 123 in my router, and I
>couldn't remember the admin password,[/color]
It's not on the sticky note taped to the front of the router?
[color=blue]
>so I had to do a hardware reset on it and reinstall VZ's Windows
>software. Oh well. Then I explicitly enabled port 123, and now ntp
>works and sets the hardware clock when Mandriva boots.[/color]
The joys of adding a new service.
Old guy
Re: HD Speed, etc. (was: Scripting, UPS Selection, etc.)
Moe Trin wrote:[color=blue][color=green]
>> Two questions to anybody: I've read that accessing data at the outer
>> tracks of a HD is faster than at the inner tracks. With current drives,
>> is there really much difference?[/color]
>
> Yes and no. You've got a copy of 'Upgrading and Repairing PCs' from
> Scott Mueller - look in the index for 'zoned bit recording'. There can
> be a 2:1 difference inn the data transfer rate between inner and outer
> tracks.[/color]
In another thread, Peter D. wrote:[color=blue]
> You can measure your drive's performance with "hdparm -tT /dev/xxx".[/color]
[adam@eris ~]$ sudo hdparm -t /dev/sda1 /dev/sda12
/dev/sda1:
Timing buffered disk reads: 200 MB in 3.01 seconds = 66.53 MB/sec
/dev/sda12:
Timing buffered disk reads: 124 MB in 3.02 seconds = 41.09 MB/sec
[adam@eris ~]$
OK, that answers that nicely.
[color=blue][color=green]
>> does Mandriva partition by cylinder or by head?[/color]
>
> That would be a function of the disk driver, and I don't know of anyone
> who does anything other than by cylinder. The inefficiency of any other
> scheme is just to great.[/color]
IIRC, mid-'80s, I had my TRS-80's HD partitioned by head. 5 MB, 4
heads, which I made into 4 partitions of 1.25 MB each. I even figured
out how to change the allocation units from 4K to 1K, which
significantly increased available space at a small cost in speed.
[color=blue][color=green][color=darkred]
>>> I didn't think you were running 24/7.[/color]
>> I'm not. Basically I power down when I go out, and power up when I
>> get back home[/color]
>
> As long as the number of outages you have isn't causing grief, then
> there is little reason to worry. One thing to think about is those
> cron-jobs.[/color]
I have both 'cron' and 'anacron' set up. If my system's on at 3 AM, the
jobs are done then. If my system's not on then, they're done after next
boot. The only time it gets confusing is when I boot or reboot between
midnight and 3 AM, and anacron does them right away.
[color=blue][color=green]
>> I wasn't clear. The hardware clock is now set to UTC instead of local
>> time, but the time displayed is still local time.[/color][/color]
'cat /proc/driver/rtc' now returns rtc_time as UTC, not ET. Times
displayed are local time. No problem there, as far as I can see.
[color=blue][color=green]
>> Also, to get ntp working I had to enable port 123 in my router, and I
>> couldn't remember the admin password,[/color]
>
> It's not on the sticky note taped to the front of the router?[/color]
Nope. I suppose I ought to write all my passwords down somewhere,
though. I can't picture someone breaking into my apartment just to use
my passwords to change settings.
Adam