- lock manager
- buffer manager
- know the states between the query engine
- write 13 non-trival routines
host all all 10.0.0.0/8 trustif the postgresql server is running, you can invoke
pg_ctl reload -D DATADIRto reload the configurations. HTH
I was manipulating a large number of arrays, and when I pushed some item into it. I increase the index one at a time. But note that the array is huge. But poor me, I was trying to write '
int32' but instead, I wrote '
int8'. So you can image that this variable is overflowed and then wrapped back. Note the size of the type, I'm telling to myself...
I was modifying a large program, and I was going to change an interface in order to reduce the data copy.
+--+ <-- allocated outside foo() | | +--+ <-- passed to foo(), try to free this address. | | | | | | +--+
The actual space is allocated outside the function foo(), and as I change the interface, I only pass the second part of the space to foo(), but I forgot to modify foo() as well, therefore, foo() still thinks the parameter passed in may be free()'ed. Then oops!
- 'cat /proc/loadavg'. This command line will give you an overall picture of how the system is running. It spans a long time.
- 'top'. This shows you some text graphics displaying how each process is playing in the system.
- 'htop'. It's an enhanced tool of 'top'. This tool takes advantage of ncurse library. And its output is really nice for boring administrators.
But what about when you're trying to calculate the CPU usage in your C/C++ program or you want to monitor the CPU usage every second. Therefore it will give you a nice picture finally.
Let's check out my little Python cpu-usage.py. It reads the file '/proc/stat' and calculates the percentage of how many jiffies are used in user computation. It may not be very precise, but it's enough for general use.
Hope you'll enjoy this little tool.
We got an DELL XPS machine and we need to set it up. However, there are several restrictions right now. The main obstacle is that one Huawei card (SSD, PCI-e slot) is installed but their company only provides us with a 2.6.18 driver. That's said, we have to installed it on 2.6.18 kernels.
There are RHEL5u1, 5u2 ... out there. I tried with RHEL 5u1, but it can't boot due to lack of proper disk driver. Duh.
Centos 5.4 saves my life. I'm afraid RHEL5u4 should work as well, but it's hard to get. This machine boots well: the disk driver(ahci) is OK, the network driver(tg3) is OK.
However, there's a small itch to scratch. The given SSD driver is of rpm format. And by default with Centos 5.4's kernel version, it will fail due to some dependency check (e.g. it requires kernel version should be less than el5.94). To accommodate this problem, I extracted this rpm package via this command line:
rpm2cpio ssd.rpm | cpio -idmv
and then manually install the kernel module. It works as expected though it outputs some message regarding this module will taints the kernel. It doesn't matter however as long as it works fine.

