Mere I

Tuesday, June 02, 2009

Internode quota from the command line in Ubuntu 9.04

I have an Internode ADSL connection. I'm running Ubuntu 9.04 Server. I wanted to be able to check my internet quota from the command line. There is a perl script is provided here, but there weren't quite enough instructions there for me to make it work. I worked it out, here's how.

juliusr@Oriole:~$ wget http://zwitterion.org/software/internode-quota-check/internode-quota-check

juliusr@Oriole:~$ chmod +x internode-quota-check

juliusr@Oriole:~$ mv internode-quota-check internode-quota-check.sh

juliusr@Oriole:~$ ls -l internode-quota-check.sh

-rwxr-xr-x 1 juliusr juliusr 12481 2009-05-09 07:20 internode-quota-check.sh

juliusr@Oriole:~$ sudo apt-get install libwww-mechanize-perl

juliusr@Oriole:~$ ./internode-quota-check.sh man

you don't seem to have a ~/.fetchmailrc, so I'll prompt you.
To avoid extra dependencies, your password will be echoed.
Username: juliusroberts
Password: passwordhere
Run this command to create a ~/.fetchmailrc file:
echo '# poll mail.internode.on.net user "juliusroberts" password "passwordhere"' >> ~/.fetchmailrc
juliusroberts: -0.119 GB (-0.6%) and 0.6 days ( 2.0%) left on 20 GB, 1.5 Mb/s plan.

juliusr@Oriole:~$
echo '# poll mail.internode.on.net user "juliusroberts" password "passwordhere"' >> ~/.fetchmailrc

juliusr@Oriole:~$ ./internode-quota-check.sh


juliusroberts: -0.119 GB (-0.6%) and 0.6 days ( 2.0%) left on 20 GB, 1.5 Mb/s plan.

Thursday, April 30, 2009

zfs-fuse broken after dist-upgrade to jaunty

juliusr@rainforest:~$ cat /etc/issue
Ubuntu 9.04 \n \l
juliusr@rainforest:~$ dpkg -l | grep -i zfs-fuse
ii zfs-fuse 0.5.1-1ubuntu5

I have two 320gb sata disks connected to a PCI raid controller:
juliusr@rainforest:~$ lspci | grep -i sata
00:08.0 RAID bus controller: Silicon Image, Inc. SiI 3512
[SATALink/SATARaid] Serial ATA Controller (rev 01)

After a dist-upgrade to jaunty my zpool mirror zfspool got broken.

juliusr@rainforest:~$ sudo zpool status
pool: zfspool
state: UNAVAIL
status: One or more devices could not be opened. There are insufficient

replicas for the pool to continue functioning.
action: Attach the missing device and online it using 'zpool online'.
see: http://www.sun.com/msg/ZFS-8000-3C
scrub: none requested
config:

NAME STATE READ WRITE CKSUM
zfspool UNAVAIL 0 0 0 insufficient replicas
mirror UNAVAIL 0 0 0 insufficient replicas
sdb FAULTED 0 0 0 corrupted data
sdc UNAVAIL 0 0 0 cannot open

I think what has happened is that somehow the drive labels sda and sdc have been swapped around and zfs-fuse got confused. IIRC i used to boot of sda, but now it looks like i'm booting of sdc.

juliusr@rainforest:~$ sudo lshw | grep -iE '/dev/sd|size'
logical name: /dev/sdc
size: 18GiB (20GB)
logical name: /dev/sdc1
size: 17GiB
logical name: /dev/sdc2
size: 839MiB
logical name: /dev/sdc5
logical name: /dev/sda
size: 298GiB (320GB)
logical name: /dev/sdb
size: 298GiB (320GB)

This is my fstab, but i suspect the commented volume labels (#/dev/sdaX) are now wrong:

juliusr@rainforest:~$ cat /etc/fstab
# /etc/fstab: static file system information.
#
proc /proc proc defaults 0 0

# /dev/sda1
UUID=d4a5ebb6-52ec-4b6f-bc8e-5052dca81ec6 / ext3 relatime,errors=remount-ro 1
# /dev/sda5
UUID=5e55071d-0ebf-4741-ba1a-4a9d70b70c78 none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0

How do i get back to a working zpool? I asked the zfs-discuss@opensolaris.org list and I received the following reply from Fajar A. Nugraha (thanks mate!):

1) stop zfs-fuse service:
juliusr@rainforest:~$ sudo /etc/init.d/zfs-fuse stop

2)delete (or move) /etc/zfs/zpool.cache
juliusr@rainforest:~$ sudo rm /etc/zfs/zpool.cache

3) start zfs-fuse
juliusr@rainforest:~$ sudo /etc/init.d/zfs-fuse stop

4) zpool import

As it happened, i didn't even need to do the zpool import, it all came up fine:

juliusr@rainforest:~$ sudo zpool status
pool: zfspool
state: ONLINE
scrub: none requested
config:

NAME STATE READ WRITE CKSUM
zfspool ONLINE 0 0 0
mirror ONLINE 0 0 0
sda ONLINE 0 0 0
sdb ONLINE 0 0 0

Labels: ,

Tuesday, February 24, 2009

How can i tell John Gay to stop chopping down more trees..

(12:05:00) Hoolio: we talk in absolutes. yet when we look at ourselves, we're totally conflicted.
(12:05:45) Graeme Oxley: cognitive dissonance is a wonderful thing
(12:06:11) Graeme Oxley: and we're very good at it
(12:07:36) Hoolio: I'm kinda growing to see environmentalism as this nice engrossing sideshow to the main stage; and that is our perpetual desire to want more and more. And in that respect, i simply can't differentiate myself from.. say .. John Gay.
(12:08:10) Hoolio: how can i tell John Gay to stop chopping down more trees, when i want a new camera?
(12:08:23) Graeme Oxley: hmmmmmmmmmmmmmmmm
(12:08:31) Hoolio: answer me that.

Labels: ,

Tuesday, February 10, 2009

Condemned by a rational mind

I haven't been meditating in quite a long time now. Usually i can handle a few months without meditating, but this time seems quite different. I find myself now feeling events weighing on me needlessly. I have, for the moment, lost my objectivity - empty mind - and i am continually feeling the consequences of an exceedingly trivial and overwhelmingly tiring subjective experience.

I found myself alone the other day, and with a little effort i found myself sitting quietly and peacefully and empty mind embraced me like a kind of belated homecoming. By saying nothing at all it said goodbye to all that. What welcome relief.

I once felt the pull of rationality as a subtle but real force intruding into an otherwise bright, crisp and clean awareness. It's presence was usually a very good sign that I was attempting to assert something where it didn't belong; to prove some "rightness", and it was duly dismissed.

If rational impulses - especially in the context of western intellectual egotism - are a dismal cycle of perception, rationalising, categorising, pontificating, arguing, posturing ad infinitum; then defence against them is a constant effort. Show me a statement that does not seek some kind of implicit approval in the larger audience, desiring in it's very communication an acknowledgement of the perception and codification of some unique esoteric insight. An ego boost. It is not without some sense of this that i consider my own motives for writing right now, but.

I am tiring of it. I wonder at the point of it. I see the collateral damage and i can't abide my involvement. I feel more condemned by a rational mind than enlightened by it. I am sure I am of sane mind (in the legal sense), but i assert that a rational mind is not necessarily a healthy mind. At very least rationality is simply a tool which is best kept honed very sharp and generally left well alone.

The ever-present relief of an objective emptiness smiles warmly by not smiling at all.

Labels:

Thursday, July 10, 2008

Dealing with our own suffering

When dealing with our own pain and suffering, by being compassionate to yourself and others we can understand that managing pain and suffering in a positive way means that others don't need to suffer it too. This compassion for others is an important positive energy which should be the focus of our attention. I am suffering this (myself) so that other people don't need to.

Hurting others by exposing them to our own pain and suffering may provide some fleeting sense of relief, but the effects are short lived and do not treat the root cause of your suffering. Moreover, the nett effect of your effort is not the resolution of your pain, but the multiplication of it onto someone else. Non-violence extends to not burdening others with our own pain and suffering.

The more we can focus on compassion, the less we care about our problems, and the more we care about other people. All of which is fantastic medicine :)

Labels:

Friday, July 20, 2007

Tethered to a stake in the sky

OK, as far as I can see it, the fundamental premise of Buddhism is that all is suffering. This conclusion is arrived at as follows: Our deluded thinking (of busy mind) creates conceptions of some kind of lasting a permanent reality in the objects of our desire, and that their possession will satiate our wanting. Often these desires aren't for simple material objects, but are for love, a sense of belonging, a lasting relationship, respect, a secure future. These are perhaps primeval drivers of human longing, and as such are perfectly 'natural' and 'normal'.

Perhaps this might happen at work when we are looking for that 'perfect job', or at home for 'getting the mediaPC working properly', at play for some sense of 'slow but steady improvment at playing chess'. If we look closley at what motivates us, or what frustrates us, we may well see this kind of wanting. This is very common behaviour for busy mind.

Sooner or later it becomes apparent that the entity which is the focus of our desire isn't that which what we had thought it was (what a long sentence! :)). After being with this thing for awhile, and learning how it really is, it becomes apparent that it does not give us all that we had we had hoped for. We become frustrated and dissatisfied. Busy mind does not question itself, but goes on looking for something else to quench the longing: so goes the cyclical pattern of existence called samsara, where 'all is suffering'.

For example, lets say we buy a new car. it's all most shiny and lovely and smells like a new car, goes like a new car, and salesman is very good at his job, and makes us believe that this new car is all that we think it is (and more maybe!). We drive it for awhile, maybe a short time, mabye a long time, and then the new car isn't so new anymore, and the engine breaks! We are angry that our new car should break. perhaps it is fixed under warranty and we are happy again. Our idea of new car is not irretrevably lost. But then it breaks again, we are more angry. Maybe we think this new car isn't so new after all. Maybe we begin to think this is not a new car, maybe we begin to think we have been dudded! We may do many things to make the car better. All the time we compare our car with this idea of new car. Sooner or later the car comes up lacking. The car is just a car. Really it has changed only a very little but, but our thinking has changed! Suddenly our new car has changed in our minds to shoddy old car. Maybe we also have bad thoughts about the salesman!! So in the end we go get another car, and the whole process begins again.

This cycle of wanting, longing, reaching, achieving, dissastisfaction, frustration.. goes on and on in so many aspects of our lives. Busy mind is too busy to understand that it is busy mind itself which has created these objects of desire. It has created something from nothing and tied itself to it. It has tethered itself to a stake in the sky.

Very busy wanting mind makes all this happen, very busy mind makes this all very important. Very busy mind is often so busy with all this business that it doesn't see what it is doing. (psssst very busy mind has a very big secret. Very big mind is so busy finding happiness, it is not sure what it is finding it for.)

Very simple mind knows just enough to know that none of this is very important. Very simple mind know just enough to know that it does not need a nice car, a nice house, a nice wife to be happy. Very simple mind knows just enough to know that it's own longing is the cause of its suffering. Very simple mind knows just enough to know that the best thing it can do is to put selfish desire aside and to help others. With upmost respect, helping others to understand the cause of their suffering is perhaps the most wonderful thing it can possibly do.

The hermit monk living in the mountains. While he's out gathering wood and roots a robber comes and strips his cabin, everything is gone. As night deepens he sits at the window and looks out at the evening moon, thinking to himself, "If only I could have given the robber this perfect, white moon." He's still wealthy. And he's asking a good question: What can I give now?

Buddhism can prepare us for the inevitable pain and suffering which we unwittingly make in our daily lives and can give us the mental fortitude to see through our desires to make decisions which can reduce our suffering; not increase it. Happiness however is just a byproduct of simple mind, certainly not an objective.

Wednesday, February 07, 2007

I thought this was interesting. it's "the" ahem:

11 Most Important Philosophical Quotations.

so, knock yourself out :)