Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Page 2 of 2 < 1 2
Topic Options
#278504 - 15/04/2006 10:32 Re: New Home Server. Help Needed....... [Re: andy]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14482
Loc: Canada
You first script/sed problem is too spread out for me to grok here. Can you summarize it in one post: inputs, and expected output? I believe it can be much simpler than even Julf's one-liner.

Cheers

Top
#278505 - 15/04/2006 10:42 Re: New Home Server. Help Needed....... [Re: andy]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14482
Loc: Canada
Quote:

R V1.0 2001-10-13 11:56:11 C
1 0012.68
1 0012.68
1 0012.75

... (it keeps outputing the temperature until you stop reading

So my shell script uses "head" to grab the first three lines of the output of the serial port. It then uses "tail" to grab the last line of the three.

...
Quote:

1268
0
0
0



Okay, so not overly simplified, but this version handles temperatures that have more/fewer leading zeros.

awk '/^1 /{ if (++i == 2) {print gensub("^0*","","g",gensub("[.]","",1,$2)) "\n0\n0\n0";exit}}'

In multi-line format, it's easier to read (or would be, if the BBS could use a proper fixed font for code display!):Code:

awk '
/^1 /{
if (++i == 2) {
tmp = gensub("[.]","",1,$2)
gsub("^0*","",tmp)
print tmp "\n0\n0\n0"
exit
}
}'



Edited by mlord (15/04/2006 10:47)

Top
#278506 - 15/04/2006 10:59 Re: New Home Server. Help Needed....... [Re: julf]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14482
Loc: Canada
Quote:
sed -n -e '3s/^....\(..\)\.\(..\)/\1\2\n0\n0\n0/p'


Here's a more portable version, that also does not assume a fixed number of leading zeros :

sed -n -e '3s/^[^ ] *0*\([^.]*\)[.]/\1/p' -e'3s/.*/0/p' -e3p -e3p

Top
#278507 - 15/04/2006 11:33 Re: New Home Server. Help Needed....... [Re: mlord]
julf
veteran

Registered: 01/10/2001
Posts: 1307
Loc: Amsterdam, The Netherlands
Indeed better, I just tried to keep it minimalistic, as the original solution was based on a fixed column position.

Top
#278508 - 15/04/2006 11:34 Re: New Home Server. Help Needed....... [Re: andy]
julf
veteran

Registered: 01/10/2001
Posts: 1307
Loc: Amsterdam, The Netherlands
Quote:
Hmmm, the \n doesn't give me a newline, it just outputs "n". Perhaps it is because I have a very old copy of sed (this box is still on RedHat 7.1).


Indeed sounds like an old version of sed. Marks solution deals with that issue anyway.

Top
#278509 - 15/04/2006 11:37 Re: New Home Server. Help Needed....... [Re: mlord]
julf
veteran

Registered: 01/10/2001
Posts: 1307
Loc: Amsterdam, The Netherlands
Quote:
awk '{print $4 " " $7}'


That what what I immediately thought of as well.
I would just use awk '{ print $4, $7 }' for clarity.

Awk must be the most under-utilized wonder tool ever.

Top
#278510 - 15/04/2006 14:54 Re: New Home Server. Help Needed....... [Re: julf]
Cris
pooh-bah

Registered: 06/02/2002
Posts: 1904
Loc: Leeds, UK
If I just wanted to display the current temp on a "current server status" type page, how would I do it? I want a summary page that lists all the usefull stuff, dsl line rate, room/system temp, webcams etc...

As an expasion of this system I would like to monitor my home central heating system, surprisingly there seems to be very little about this on the web (that I can find), a thermostat with a web interface would be perfect

Cheers

Cris.

Top
#278511 - 15/04/2006 15:11 Re: New Home Server. Help Needed....... [Re: Cris]
andym
carpal tunnel

Registered: 17/01/2002
Posts: 3995
Loc: Manchester UK
You probably just want something like this....

http://www.eix.co.uk/Ethernet/SitePlayer/Welcome.htm

Think I've mentioned it before....
_________________________
Cheers,

Andy M

Top
#278512 - 15/04/2006 15:39 Re: New Home Server. Help Needed....... [Re: andym]
sn00p
addict

Registered: 24/07/2002
Posts: 618
Loc: South London
Yeah.

We're using a Microchip ENC28J60 (10Mbit MAC+PHY) mainly because we're pin bound on a project and this thing uses SPI, but it requires only a couple of caps, resistors and a RJ45 (integrated magnetics).

What's more, if you were to pick a suitable PIC, microchip have a TCP stack that you can use straight up.

The ehternet chip is available in a 28 pin DIP from farnell at around £5 a pop.

Top
#278513 - 15/04/2006 19:52 Re: New Home Server. Help Needed....... [Re: andym]
Cris
pooh-bah

Registered: 06/02/2002
Posts: 1904
Loc: Leeds, UK
Quote:
You probably just want something like this....


Yes I do, it looks perfect for what I need. Do you mind if I bend your ear when I get stuck (gunna happen!)

Cheers

Cris.

Top
#278514 - 15/04/2006 19:59 Re: New Home Server. Help Needed....... [Re: Cris]
andym
carpal tunnel

Registered: 17/01/2002
Posts: 3995
Loc: Manchester UK
Yup, sounds like fun!
_________________________
Cheers,

Andy M

Top
#278515 - 15/04/2006 20:11 Re: New Home Server. Help Needed....... [Re: Cris]
andym
carpal tunnel

Registered: 17/01/2002
Posts: 3995
Loc: Manchester UK
Looks like my bid of £55 was sucessful too! Another PC to add to the collection.... Damn you Matthews!
_________________________
Cheers,

Andy M

Top
#278516 - 15/04/2006 20:37 Re: New Home Server. Help Needed....... [Re: andym]
Cris
pooh-bah

Registered: 06/02/2002
Posts: 1904
Loc: Leeds, UK
Go and pick it up from him, drop Amy off at the Trafford centre on the way Tell him I sent you, maybe I'll get some really good deals (to share) next time I go? I want a 3rd now, to go under the (future) HDTV.

Cheers

Cris.

Top
#278517 - 15/04/2006 21:30 Re: New Home Server. Help Needed....... [Re: julf]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14482
Loc: Canada
Quote:
Awk must be the most under-utilized wonder tool ever.


Yes (except for here, of course!).

I just see so much stuff being done with SQL databases, PHP, and Perl, when it could all have been so much simpler as basic ASCII flat files with an awk script or two.

Cheers!

Top
#278518 - 16/04/2006 06:38 Re: New Home Server. Help Needed....... [Re: Cris]
andym
carpal tunnel

Registered: 17/01/2002
Posts: 3995
Loc: Manchester UK
Couldn't find their address anywhere and I've already paid for it to be delivered. I'll drop them an email and see if they'll let me pick it up.
_________________________
Cheers,

Andy M

Top
#278519 - 16/04/2006 11:49 Re: New Home Server. Help Needed....... [Re: mlord]
julf
veteran

Registered: 01/10/2001
Posts: 1307
Loc: Amsterdam, The Netherlands
Quote:
I just see so much stuff being done with SQL databases, PHP, and Perl, when it could all have been so much simpler as basic ASCII flat files with an awk script or two.


Indeed. Back in my bad old days of teaching UNIX training courses in the 80's, I usually got people's jaws to drop when I showed some simple examples of the power of awk. Too bad nothing has changed in the last 25 years. (OK, they would have used something even more horrible than PHP and Perl...)

Cheers!

Top
#278520 - 18/04/2006 14:21 Re: New Home Server. Help Needed....... [Re: andy]
andy
carpal tunnel

Registered: 10/06/1999
Posts: 5914
Loc: Wivenhoe, Essex, UK
I've got my server completely up and running now, I've learnt a few things about Linux software RAID along the way - like if you install a new kernel while an array is degraded it will always be degraded on reboot, until you re-run mkinitrd.

I have one problem though. It looks like the EPIA SP 13000 refuses to boot if it is hot. It will soft reboot quite happily, a "reboot" from the Linux command line works perfectly.

If however I use the power switch on the box to power it off and back on or yank the power it refuses to boot. It powers the main board (the Ethernet link light comes on) but doesn't turn on the VGA output or spin up the drives.

If I leave it a few minutes and try again it boots ok.

I think it was doing this before I replaced the fansink with the heat pipe, though I only booted it a couple of times before removing the fansink.

Anyone else seen anything like this ?
_________________________
Remind me to change my signature to something more interesting someday

Top
#278521 - 18/04/2006 17:48 Re: New Home Server. Help Needed....... [Re: andy]
Cris
pooh-bah

Registered: 06/02/2002
Posts: 1904
Loc: Leeds, UK
I have a PD10000 for the firewall/server and haven't noticed a problem like that. I am planning to use an SP13000 for the CCTV machine in good time, but I don't like the sound of that reboot problem, are you running the latest BIOS etc?

I have configured software RAID too, is there any way to see if it's working without removing the server from the rack to disconnect the drive(s)?

Cheers

Cris.

Top
#278522 - 18/04/2006 18:04 Re: New Home Server. Help Needed....... [Re: Cris]
andy
carpal tunnel

Registered: 10/06/1999
Posts: 5914
Loc: Wivenhoe, Essex, UK
I'm not running the latest BIOS yet, no. I plan on trying that once my latest RAID rebuild has finished. I also haven't dug around in the BIOS screens yet to see if there is anything there to help.

You could probably disable one of the drives in the BIOS to test a complete drive failure. Failing that you can do a partial test by failing one of the drives in the array using mdadm.

Edit: I've checked, I'm running the latest BIOS


Edited by andy (18/04/2006 19:29)
_________________________
Remind me to change my signature to something more interesting someday

Top
#278523 - 18/04/2006 18:37 Re: New Home Server. Help Needed....... [Re: andy]
andym
carpal tunnel

Registered: 17/01/2002
Posts: 3995
Loc: Manchester UK
Quote:
If however I use the power switch on the box to power it off and back on or yank the power it refuses to boot. It powers the main board (the Ethernet link light comes on) but doesn't turn on the VGA output or spin up the drives.


I usually just make sure that resume on AC is selected in the BIOS and usually takes care of it.

Just had my email to say my case has been dispatched.
_________________________
Cheers,

Andy M

Top
#278524 - 18/04/2006 18:54 Re: New Home Server. Help Needed....... [Re: andym]
andy
carpal tunnel

Registered: 10/06/1999
Posts: 5914
Loc: Wivenhoe, Essex, UK
Quote:

I usually just make sure that resume on AC is selected in the BIOS and usually takes care of it.



I have that set, it doesn't help. When it is in its "hot" state you hit the power button, the power light comes on but it doesn't event attempt to boot.

Hey, I just cracked 3000 posts


Edited by andy (18/04/2006 18:55)
_________________________
Remind me to change my signature to something more interesting someday

Top
#278525 - 29/04/2006 07:06 Re: New Home Server. Help Needed....... [Re: andy]
andy
carpal tunnel

Registered: 10/06/1999
Posts: 5914
Loc: Wivenhoe, Essex, UK
Quote:

Thanks to your post I finally spurred myself into action and bought the parts for my silent server (to replace the two big noisy and hot servers that currently live in my garage).

I was going to buy my T2e chassis from mini-itx.com, which would have cost me £150. After your post I bought it direct from Tranquil for £65 (via a "best offer" bid) ! Thanks.

I also got a PSU and EPIA SP13000 from them at the same time, with only £10 postage for the lot.



A warning to anyone buying from tranquil_d on ebay, they seem to be hopeless at communication when things don't go quite right. I am trying to get some answers from them with regard to the reboot problems I am having and they also owe me some postage refund. Despite emailing them repeatedly and contacting them via ebay I can't get a response.

I am assuming that tranquil_d is the same as http://www.tranquilpc-shop.co.uk/ so I'll try and phone them next week using the contact number on their website.

I've never left neutral or negative feedback before, don't really want to this time.
_________________________
Remind me to change my signature to something more interesting someday

Top
#278526 - 29/04/2006 08:43 Re: New Home Server. Help Needed....... [Re: andy]
andym
carpal tunnel

Registered: 17/01/2002
Posts: 3995
Loc: Manchester UK
I ordered 3 CF to IDE adaptors and I got an empty jiffy bag from them yesterday. It'd obviously split open in transit. Just sent an email.... let's see how quick they are! Needless to say I'll hold off leaving any feedback for a couple of days.
_________________________
Cheers,

Andy M

Top
#278527 - 29/04/2006 09:06 Re: New Home Server. Help Needed....... [Re: andym]
andy
carpal tunnel

Registered: 10/06/1999
Posts: 5914
Loc: Wivenhoe, Essex, UK
I first emailed them 11 days ago now, if emailed again giving my Gmail address in case they were having problems with my normal address.

I wish I could do some troubleshooting to find out which component is at fault (PSU, power brick or motherboard). The obvious thing would be to plug at normal ATX power supply in, unfortunately all my ATX era PCs here are Dells, which means the ATX connector isn't really an ATX connector. I might have to go and buy a real ATX PSU just to test this.
_________________________
Remind me to change my signature to something more interesting someday

Top
#278528 - 30/04/2006 05:50 Re: New Home Server. Help Needed....... [Re: andy]
Cris
pooh-bah

Registered: 06/02/2002
Posts: 1904
Loc: Leeds, UK
Have you tried sending them a message via eBay? That is what I have always done and have always had a speedy responce.

Cheers

Cris.

Top
#278529 - 30/04/2006 06:39 Re: New Home Server. Help Needed....... [Re: Cris]
andy
carpal tunnel

Registered: 10/06/1999
Posts: 5914
Loc: Wivenhoe, Essex, UK
Quote:
Have you tried sending them a message via eBay? That is what I have always done and have always had a speedy responce.


Yes, twice.
_________________________
Remind me to change my signature to something more interesting someday

Top
Page 2 of 2 < 1 2