Resource shortage – OpenVZ Wiki
December 5, 2007
How to change quota’s in an openvz ve:
In the root node :
vzctl set NODE_NUMBER –diskspace hard:soft –save
example:
vzctl set 101 –diskinodes 220000:220000 –save
See:
http://wiki.openvz.org/Resource_shortage
replacing with newlines in emacs
December 4, 2007
Wow, learned how to do something in emacs that I’ve wanted to do for probably 10 years now.
Replace text with newlines. Here’s how:
when in replace mode, press control-q control-j to insert the newline.
I used replace:
<pre>
on><op></op></pre>
with
<pre>
on>control-q control-j<op></op></pre>
it to fix this ugly html:
<pre>
linux rockslinux rocks the casbahlinux is rad
</pre>
with this:
<blockquote><pre>
linux rocks
linux rocks the casbah
linux is rad
</pre></blockquote>
Of course in real life I had about 50 options I would have had to edit by hand to make it all pretty.
Thanks to http://www.cs.umd.edu/~jspacco/emacs.html
So you’ve got a mysql server with an unknown number of isam tables and you need to convert them (the easy way)? Here’s how:
find /var/lib/mysql/ -name “*.ISM” -print > convert.txt
emacs convert.txt
replace: “/var/lib/mysql/” with “alter table “
replace “.ISM” with ” type = myisam;”
replace “/” with “.”
Be careful to include the spaces where I have them.
The run:
mysql -u root -p < convert.txt
Want to make your mysql 5.x server super duper slow?
February 26, 2007
Do you want to make your mysql 5.x server super duper slow? Want to anger all your users and loose clients? Of course you do!
No problem, chmod 0 any database dir. Now run “show databases”, slow isn’t it?
As far as I can tell mysql 4.o.x doesn’t do this (don’t run any 4.1.x to test those). Sometimes when I needed to quickly disable a problem database I’d chmod 0 the database dir. Never had a problem in the past but it is killing a recent 5.x install.