Technology
-
How to check LVM usage history
If your lvm storage has some problem, you can dump it with the following command. $ dd if= of=lvm_head.out bs=100M count=1 $ strings lvm_head.out > dump.txt And make the following awk script (lvm_history.awk) to check the history. BEGIN { new = 1 pecount = 0 } { if ($1 == “pe_count”) pecount = $3 if… Continue reading
-
How to extract RPM without installing it
rpm2cpio myrpmfile.rpm | cpio -idmv http://pagead2.googlesyndication.com/pagead/show_ads.js Continue reading
-
module taint
static char *module_flags(struct module *mod, char *buf) { int bx = 0; if (mod->taints || mod->state == MODULE_STATE_GOING || mod->state == MODULE_STATE_COMING) { buf[bx++] = ‘(‘; if (mod->taints & (1 <taints & (1 <taints & (1 <state == MODULE_STATE_GOING) buf[bx++] = ‘-‘; /* Show a + for module-is-being-loaded */ if (mod->state == MODULE_STATE_COMING) buf[bx++] =… Continue reading
-
How to check who uses semaphore in the system
With ‘ipcs -s’ command we can see how many semaphores are existing and who created it, but sometimes, we wants to know who actually uses it. Here’s a simple application you can check with semctl() function. /* sem_pid.c */ #include #include #include #include #include int main(int argc, char **argv){ if (argc < 2) { printf("Usage:… Continue reading
-
Howto change __MyCompanyName__ in your project with Xcode
You might doesn’t like the comment at the top of your Xcode project files. // // ViewController.m // CITest // // Created by Sungju Kwon on 4/21/12. // Copyright (c) 2012 __MyCompanyName__. All rights reserved. // I’ve checked the internet for the possible solution, and I could find below. defaults write com.apple.Xcode PBXCustomTemplateMacroDefinitions ‘{ORGANIZATIONNAME=”Sungju Kwon”;}’… Continue reading
-
Use hexadecimal in ‘bc’
‘bc’ is really cool application in Linux/Unix. it provides lots of convenient functions without launching GUI calculator. One thing sometimes necessary is a conversion for the calculation. Mostly converting hexadecimal and decimal. If you want to use hexadecimal for the input, you can use ‘ibase=16’ and below value will be all treated as 16base. $… Continue reading
-
Xcode 4.3.2 organizer crash
After upgrading to Xcode 4.3.2, it becomes very hard to keep developing without crash. Most biggest challenge was configuring iPhone devices in Organizer window. It crashed all the time when I tried to open ‘Device’ tab. Sometimes, it just crashed when I plug my iPhone to the system. It looks like it has a problem… Continue reading
-
Use static DHCP IP address in VMWare Fusion guests
MacBook Pro is really nice laptop for developing. With great power in this gadget, you also can create lots of virtual guests. With this virtual guests, you can try various kinds of test. Sometimes, there’s a case you want to use fixed IP address (even though it’s a private IP) to communicate with other virtual… Continue reading
-
LVM filter generation
To limit unnecessary I/O, you might need to make a filter in /etc/lvm/lvm.conf and sometimes, it’s hard to find a proper filter configuration. Here is a simple way you can get a good filter. $ pvs -a –config ‘devices { filter = [ “a|.*|” ] }’ –noheadings -opv_name,fmt,vg_name | awk ‘BEGIN { f = “”;… Continue reading
-
playing morse signals in Linux box
Recently, someone asked me about what TSC (Time Stamp Counter) and it reminds me one of my old day code. morse playing module!. Here’s the code. It unfortunately has old style code and I don’t have enough time to change it. /* morse_io.c */ #include #include #include #include #include #include #include MODULE_LICENSE(“GPL”); #define CLK_FREQ (1193180L)… Continue reading
-
Creating virtual networks with NetworkManager
In Linux, you can create a virtual network – aka. vlan. To create it you need to create a file under /etc/sysconfig/network-scripts/ directory. For example, if you want to create a virtual network for eth0, you need to create a file something like below. Here I created with a tag 0. $ cat /etc/sysconfig/network-scripts/ifcfg-eth0:0 DEVICE=”eth0:0″… Continue reading
About Me
A software engineer who loves any technologies that makes life easier. That’s why I love Linux and Mac at the same time.