[gentoo-user] Restore Gentoo, portage not consistent with actually installed

2008-06-16 Thread Joris Dobbelsteen

Dear,

I have yet again tried to upgrade my Xen software to a later version, 
which almost worked fine. Since I needed it fully working I have 
restored my original installation. Basically this is just using 
xfsrestore for / (root), dd to restore /boot. However I have left 
/usr/portage alone, as I considered it volatile (restorable with emerge 
--sync).


However at this point portage does not seem to know what is actually 
installed and what is no longer available.


For example:
equery -i list | grep xen
app-emulation/xen-3.1.2
app-emulation/xen-3.2.1
app-emulation/xen-tools-3.1.2
app-emulation/xen-tools-3.2.1
sys-kernel/xen-sources-2.6.20-r6
sys-kernel/xen-sources-2.6.21

It seems that xfsrestore doesn't remove all existing files, but rather 
overwrites portions. How do I clean up my system again, as the state is 
rather corrupted at this point?


Before I forgot to ask, is there a LiveCD that actually includes 
xfsrestore? I'm missing it on the gentoo 2007 install CD.


- Joris
--
gentoo-user@lists.gentoo.org mailing list



[gentoo-user] Xen 3.2.1 - all HVM network packets dropped

2008-06-16 Thread Joris Dobbelsteen

Dear,

I've attempted to upgrade a Xen box from 3.1.2 to 3.2.1. Unfortunately
it has been a partial success only. At this point I'm really stuck
with a network problem that affects my HVM machines (Linux PV run
fine).

The really odd thing is that everything seems to work properly, except
that the vif network interfaces in dom0 seem to have only dropped TX
packets for the HVM domains and 0 RX packets. It seems like something
is broken in the network communication path between the HVM domain and
dom0.

A second change I made was to use Gentoo for configuration of the
bridge device, rather than the network-bridge script. I did this
already for some other bridges, but these don't have any HVM domains
connected.

Also, ipvs (linux virtual server) doesn't seem to work. Although I 
cannot yet claim this is caused by the upgrade, it seems likely. Xen was 
te only change made before I broke that functionality.

Every configuration, I expect you should know is, I hope, included below:

Anyone know/guessing what's going wrong?
Is there any known problem?
How can I solve this?
How can I diagnose this?

Unfortunally I need my services and I restored my previous backup, so I 
don't really have a box handy any more to try out these things.


- Joris

===

*Configuration*

Hardware
Intel Core 2 Duo E6750 2.66 GHz (clocked at 2.0 GHz)
Intel PRO/1000 NIC (eth0)
Realtek RTL8168b/8111b (eth1)

Hypervisor:
Gentoo 2007, Xen 3.2.1. 64-bit
(XEN) Xen version 3.2.1 ([EMAIL PROTECTED]) (gcc version 3.4.6
(Gentoo Hardened 3.4.6-r2 p1.5, ssp-3.4.6-1.0, pie-8.7.10)) Sun Jun 15
19:54:30 CEST 2008

Dom0:
Gentoo 2007 Linux. 64-bit
Linux version 2.6.20-xen-r6 ([EMAIL PROTECTED]) (gcc version 3.4.6 (Gentoo
Hardened 3.4.6-r2 p1.5, ssp-3.4.6-1.0, pie-8.7.10)) #15 SMP Tue Jan 22
17:12:46 CET 2008
(This version was working perfectly in combination with Xen 3.1.2)

DomU (HVM):
Windows Server 2003 SP2, 32-bit
Ubuntu 6.06 LTS Dapper Drake, 32-bit

===

*Dom0 ifconfig (portions only)*

Please notice the TX dropped!
eth0  Link encap:Ethernet  HWaddr 00:1B:21:05:02:77
  UP BROADCAST RUNNING PROMISC MULTICAST  MTU:1500  Metric:1
  RX packets:58606 errors:0 dropped:0 overruns:0 frame:0
  TX packets:97615 errors:0 dropped:0 overruns:0 carrier:0
  collisions:0 txqueuelen:1000
  RX bytes:5015772 (4.7 Mb)  TX bytes:43265853 (41.2 Mb)
  Base address:0xb000 Memory:f102-f104
--
eth1  Link encap:Ethernet  HWaddr 00:1A:4D:50:02:9C
  UP BROADCAST RUNNING PROMISC MULTICAST  MTU:1500  Metric:1
  RX packets:979621 errors:0 dropped:0 overruns:0 frame:0
  TX packets:967219 errors:0 dropped:0 overruns:0 carrier:0
  collisions:0 txqueuelen:1000
  RX bytes:300713690 (286.7 Mb)  TX bytes:292573959 (279.0 Mb)
  Interrupt:16 Base address:0x6000
--
vif16.0   Link encap:Ethernet  HWaddr FE:FF:FF:FF:FF:FF
  UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
  RX packets:0 errors:0 dropped:0 overruns:0 frame:0
  TX packets:0 errors:0 dropped:11676 overruns:0 carrier:0
  collisions:0 txqueuelen:32
  RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

--
vif18.0   Link encap:Ethernet  HWaddr FE:FF:FF:FF:FF:FF
  UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
  RX packets:0 errors:0 dropped:0 overruns:0 frame:0
  TX packets:0 errors:0 dropped:11617 overruns:0 carrier:0
  collisions:0 txqueuelen:32
  RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

vif19.0   Link encap:Ethernet  HWaddr FE:FF:FF:FF:FF:FF
  UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
  RX packets:0 errors:0 dropped:0 overruns:0 frame:0
  TX packets:0 errors:0 dropped:11600 overruns:0 carrier:0
  collisions:0 txqueuelen:32
  RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

--
vif21.0   Link encap:Ethernet  HWaddr FE:FF:FF:FF:FF:FF
  UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
  RX packets:0 errors:0 dropped:0 overruns:0 frame:0
  TX packets:0 errors:0 dropped:11428 overruns:0 carrier:0
  collisions:0 txqueuelen:32
  RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
--
xenbr0Link encap:Ethernet  HWaddr 00:1B:21:05:02:77
  inet addr:192.168.10.32  Bcast:192.168.10.255  Mask:255.255.255.0
  UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
  RX packets:77866 errors:0 dropped:0 overruns:0 frame:0
  TX packets:67193 errors:0 dropped:0 overruns:0 carrier:0
  collisions:0 txqueuelen:0
  RX bytes:8868267 (8.4 Mb)  TX bytes:35487507 (33.8 Mb)

xenbr1Link encap:Ethernet  HWaddr 00:1A:4D:50:02:9C
  UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
  RX packets:213 errors:0 dropped:0 overruns:0 frame:0
  TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
  collisions:0 txqueuelen:0
  RX bytes:9700 (9.4 Kb)  TX bytes:0 (0.0 b)

xenbr2Link encap:Ethernet  HWaddr FE:FF:FF:FF:FF:FF
   

[gentoo-user] Script to kill long-running application

2008-04-28 Thread Joris Dobbelsteen

Dear,

I'm looking for a script that can kill an application after it has been 
running for a 'long' time. I like to measure the start time (as it 
offloads work, the CPU time time is not a good estimate). Does anyone 
have something useful or some pointers to something I can use for this?


Preferably the script should monitor the processes that are currently 
running.


Thanks,

- Joris
--
gentoo-user@lists.gentoo.org mailing list



Re: [gentoo-user] Script to kill long-running application

2008-04-28 Thread Joris Dobbelsteen

Alan McKinnon wrote:

On Monday 28 April 2008, Joris Dobbelsteen wrote:

Dear,

I'm looking for a script that can kill an application after it has
been running for a 'long' time. I like to measure the start time (as
it offloads work, the CPU time time is not a good estimate). Does
anyone have something useful or some pointers to something I can use
for this?

Preferably the script should monitor the processes that are currently
running.


Assuming by long time you mean wall clock time, I would try this 
approach:


1. start your app from a wrapper script that starts your app then 
creates a file named like /var/run/my-monitor/pid and contains the 
output from 'date' when it was started. 
2. write another script that will read all files in /var/run/my-monitor/ 
and calculate the difference between start time and current time. If it 
passes some threshold, kill the process with the PID of the filename

3. run this second script from cron every minute:
   * * * * * root my-monitor-killer

alan


Thanks for your support, however I'm looking for more of less something 
already created (sames.


However afer a complete day searching (total time) I refound what I had 
spotted a couple weeks earlier:

http://sial.org/code/perl/scripts/timeout.pl
It doesn't pass back exit codes, which is a major problem for me, as I 
rely on them (in the upper level script)...


Regarding pam_limits: I'm a user on the box, not the admin... So this 
won't work.


- Joris

--
gentoo-user@lists.gentoo.org mailing list