EzDev.org

system interview questions

Top 15 system interview questions

17381 Jobs openings for system


Very large log files, what should I do?

(This question deals with a similar issue, but it talks about a rotated log file.)

Today I got a system message regarding very low /var space.

As usual I executed the commands in the line of sudo apt-get clean which improved the scenario only slightly. Then I deleted the rotated log files which again provided very little improvement.

Upon examination I find that some log files in the /var/log has grown up to be very huge ones. To be specific, ls -lSh /var/log gives,

total 28G
-rw-r----- 1 syslog            adm      14G Aug 23 21:56 kern.log
-rw-r----- 1 syslog            adm      14G Aug 23 21:56 syslog
-rw-rw-r-- 1 root              utmp    390K Aug 23 21:47 wtmp
-rw-r--r-- 1 root              root    287K Aug 23 21:42 dpkg.log
-rw-rw-r-- 1 root              utmp    287K Aug 23 20:43 lastlog

As we can see, the first two are the offending ones. I am mildly surprised why such large files have not been rotated.

So, what should I do? Simply delete these files and then reboot? Or go for some more prudent steps?

I am using Ubuntu 14.04.

UPDATE 1

To begin with, the system is only several months old. I had to install the system from scratch couple of months back after a hard disk crash.

Now, as advised in this answer, I first checked the offending log files using tail, no surprise there. Then, for deeper inspection, I executed this script from the same answer.

for log in /var/log/{syslog,kern.log}; do 
  echo "${log} :"
  sed -e 's/\[[^]]\+\]//' -e 's/.*[0-9]\{2\}:[0-9]\{2\}:[0-9]\{2\}//' ${log} \
  | sort | uniq -c | sort -hr | head -10
done

The process took several hours. The output was in the line of,

/var/log/syslog :
71209229  Rafid-Hamiz-Dell kernel:  sda3: rw=1, want=7638104968240336200, limit=1681522688
53929977  Rafid-Hamiz-Dell kernel:  attempt to access beyond end of device
17280298  Rafid-Hamiz-Dell kernel:  attempt to access beyond end of device
   1639  Rafid-Hamiz-Dell kernel:  EXT4-fs warning (device sda3): ext4_end_bio:317: I/O error -5 writing to inode 6819258 (offset 0 size 4096 starting block 54763121030042024)
       <snipped>

/var/log/kern.log.1 :
71210257  Rafid-Hamiz-Dell kernel:  attempt to access beyond end of device
71209212  Rafid-Hamiz-Dell kernel:  sda3: rw=1, want=7638104968240336200, limit=1681522688
   1639  Rafid-Hamiz-Dell kernel:  EXT4-fs warning (device sda3): ext4_end_bio:317: I/O error -5 writing to inode 6819258 (offset 0 size 4096 starting block 954763121030042024)

(/dev/sda3 is my home directory. As we can find,

lsblk /dev/sda
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 931.5G  0 disk 
├─sda1   8:1    0 122.1G  0 part /
├─sda2   8:2    0   7.6G  0 part [SWAP]
└─sda3   8:3    0 801.8G  0 part /home

Why a process will want to write beyond the limit is actually outside the scope of my comprehension. Perhaps I will want to ask a different question in this forum if this continues even after a system update.)

Then, from this answer (you may want to check this for a deeper understanding), I executed,

sudo su -
> kern.log
> syslog

Now, these files have zero sizes. The system is running fine before and after a reboot.

I will watch these files (along with others) in the next few days and report back should
they behave out-of-line.

As a final note, both the offending files (kern.log and syslog), are set to be rotated, as inspection of the files (grep helped) inside /etc/logrotate.d/ shows.

UPDATE 2

The log files are actually rotated. Looks like the large sizes were attained on a single day.


Source: (StackOverflow)

Is it possible to do a remote wipe of a system?

My office had a break-in over the weekend, and several laptops were stolen. Mine wasn't one of them, but I'm curious - the owners of the stolen computers (Windows and Mac) are all talking about remote wipe software. Is there anything like this for Linux? Something that would allow me to remotely wipe my system if it's ever lost or stolen.


Source: (StackOverflow)

Tons of general protection faults

I recently upgraded my home server from Ubuntu 10.04 to 12.04.1. It runs the linux-image-server kernel, x86_64 arch.

There's nothing particularly unusual running, I think -- a deluge daemon, apache2, iptables firewall with IP masquerading, DHCP server, bind DNS server which has zone files updated automatically with the hostnames DHCP clients identify themselves with, sshd, nfs server, a handful of other things. This machine is my router -- it sits between the internet and the local network.

Since the upgrade it has been failing intermittently. It'll be fine for a while after booting and then suddenly we'll lose our network connections on wifi. If I plug in a network cable I can't get an IP address from the DHCP server. If I set myself a static IP address I can continue to access the internet just fine. This makes it look like it's the DHCP server that fails (indeed, I run dhclient -v eth0 and nothing responds to the dhcpdiscover shoutouts), noticed when the clients try to renew their IP leases. But wired with a static IP I can still get to the internet, so iptables is still chugging along just fine.

So I try to log in to the machine over SSH, but it seems to hang. If I make ssh verbose I see that it does establish a connection to the server, then fails a little further down the line -- hard to see where exactly.

I note that if I try to grab a web page from its HTTP server I get the page I request but any extra requests made (for images, stylesheets, javascripts) are not served. I can however get these files if I request them directly, for instance from curl.

Is this suggesting that things are going downhill whenever something attempts to fork?

I dragged a monitor and keyboard to the server (it's usually headless) and had a look -- I see stack traces.

I switch to a fresh virtual terminal and attempt to log in. I get a stack trace (general protection fault) after entering my password. Here it is:

Jan  6 20:19:54 localhost kernel: [ 1475.178245] general protection fault: 0000 [#12] SMP 
Jan  6 20:19:54 localhost kernel: [ 1475.178292] CPU 1 
Jan  6 20:19:54 localhost kernel: [ 1475.178309] Modules linked in: btrfs zlib_deflate libcrc32c ufs qnx4 hfsplus hfs minix ntfs vfat msdos fat jfs xfs reiserfs ext2 nfsd nfs lockd fscache auth_rpcgss nfs_acl sunrpc dm_crypt ppdev ipt_REJECT ipt_LOG ipt_MASQUERADE xt_state iptable_mangle iptable_nat nf_nat nf_conntrack_ipv4 nf_conntrack nf_defrag_ipv4 iptable_filter ip_tables x_tables joydev sp5100_tco edac_core i2c_piix4 serio_raw k8temp edac_mce_amd snd_hda_codec_hdmi snd_hda_intel snd_hda_codec snd_hwdep snd_pcm snd_timer snd soundcore parport_pc snd_page_alloc mac_hid shpchp lp parport radeon 8139too ttm drm_kms_helper drm pata_atiixp i2c_algo_bit usbhid hid wmi r8169
Jan  6 20:19:54 localhost kernel: [ 1475.178911] 
Jan  6 20:19:54 localhost kernel: [ 1475.178927] Pid: 1305, comm: login Tainted: G    B D      3.2.0-35-generic #55-Ubuntu Gigabyte Technology Co., Ltd. GA-MA785GM-US2H/GA-MA785GM-US2H
Jan  6 20:19:54 localhost kernel: [ 1475.179028] RIP: 0010:[<ffffffff8116589a>]  [<ffffffff8116589a>] kmem_cache_alloc+0x5a/0x140
Jan  6 20:19:54 localhost kernel: [ 1475.179096] RSP: 0018:ffff88006b251d78  EFLAGS: 00010206
Jan  6 20:19:54 localhost kernel: [ 1475.179135] RAX: 0000000000000000 RBX: 00007f062bb91000 RCX: 000000000005b2ed
Jan  6 20:19:54 localhost kernel: [ 1475.179186] RDX: 000000000005b2ec RSI: 0000000000016da0 RDI: ffff88006d408a00
Jan  6 20:19:54 localhost kernel: [ 1475.179236] RBP: ffff88006b251dc8 R08: ffff88006fa96da0 R09: 0000000000000001
Jan  6 20:19:54 localhost kernel: [ 1475.179287] R10: 00000000000000d1 R11: ffff88006b23a8f0 R12: ffff88006d408a00
Jan  6 20:19:54 localhost kernel: [ 1475.179336] R13: 2665c4979a04b7b8 R14: ffffffff811447c5 R15: 00000000000080d0
Jan  6 20:19:54 localhost kernel: [ 1475.179387] FS:  00007f062bb81700(0000) GS:ffff88006fa80000(0000) knlGS:0000000000000000
Jan  6 20:19:54 localhost kernel: [ 1475.179445] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Jan  6 20:19:54 localhost kernel: [ 1475.179486] CR2: 00007f9b4d79da00 CR3: 0000000059a34000 CR4: 00000000000006e0
Jan  6 20:19:54 localhost kernel: [ 1475.179536] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
Jan  6 20:19:54 localhost kernel: [ 1475.179586] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Jan  6 20:19:54 localhost kernel: [ 1475.179637] Process login (pid: 1305, threadinfo ffff88006b250000, task ffff880036058000)
Jan  6 20:19:54 localhost kernel: [ 1475.179695] Stack:
Jan  6 20:19:54 localhost kernel: [ 1475.179711]  ffff880036058000 0000000000000041 0000000000000001 ffffffff81188cec
Jan  6 20:19:54 localhost kernel: [ 1475.179777]  0000000000000282 00007f062bb91000 ffff88006822ce00 0000000000000001
Jan  6 20:19:54 localhost kernel: [ 1475.179841]  0000000000001000 0000000000000000 ffff88006b251e88 ffffffff811447c5
Jan  6 20:19:54 localhost kernel: [ 1475.179905] Call Trace:
Jan  6 20:19:54 localhost kernel: [ 1475.179928]  [<ffffffff81188cec>] ? path_openat+0xfc/0x3f0
Jan  6 20:19:54 localhost kernel: [ 1475.179971]  [<ffffffff811447c5>] mmap_region+0x2a5/0x4f0
Jan  6 20:19:54 localhost kernel: [ 1475.180012]  [<ffffffff81144d58>] do_mmap_pgoff+0x348/0x360
Jan  6 20:19:54 localhost kernel: [ 1475.180054]  [<ffffffff81144e36>] sys_mmap_pgoff+0xc6/0x230
Jan  6 20:19:54 localhost kernel: [ 1475.180098]  [<ffffffff81018b12>] sys_mmap+0x22/0x30
Jan  6 20:19:54 localhost kernel: [ 1475.180136]  [<ffffffff816655c2>] system_call_fastpath+0x16/0x1b
Jan  6 20:19:54 localhost kernel: [ 1475.180180] Code: 00 4d 8b 04 24 65 4c 03 04 25 50 da 00 00 49 8b 50 08 4d 8b 28 4d 85 ed 0f 84 d8 00 00 00 49 63 44 24 20 49 8b 34 24 48 8d 4a 01 <49> 8b 5c 05 00 4c 89 e8 65 48 0f c7 0e 0f 94 c0 84 c0 74 c2 4d 
Jan  6 20:19:54 localhost kernel: [ 1475.180503] RIP  [<ffffffff8116589a>] kmem_cache_alloc+0x5a/0x140
Jan  6 20:19:54 localhost kernel: [ 1475.180552]  RSP <ffff88006b251d78>
Jan  6 20:19:54 localhost kernel: [ 1475.180603] ---[ end trace 766ef1ef52f774b9 ]---

If I watch long enough, I see more general protection faults. I've seen them for login, apache2, deluge-web, head, powerbtn.sh so far.

I have to hard reset the machine to get it back to a working state (I even get a general protection fault for powerbtn.sh when I hit the power button), but it's not long before it gets like this again.

I haven't yet figured out how to reproduce this on demand -- it seems to happen randomly.

In case it's useful, I looked through kern.log and found the first such fault. There's a ton of them all in a row starting with zsh, then deluged, apache2, cron, head, console-kit-dae, irqbalance, nmbd... Here's the zsh one and the bad page state error which comes right after:

Jan  6 20:13:35 localhost kernel: [ 1096.184250] general protection fault: 0000 [#1] SMP 
Jan  6 20:13:35 localhost kernel: [ 1096.186339] CPU 1 
Jan  6 20:13:35 localhost kernel: [ 1096.186355] Modules linked in: btrfs zlib_deflate libcrc32c ufs qnx4 hfsplus hfs minix ntfs vfat msdos fat jfs xfs reiserfs ext2 nfsd nfs lockd fscache auth_rpcgss nfs_acl sunrpc dm_crypt ppdev ipt_REJECT ipt_LOG ipt_MASQUERADE xt_state iptable_mangle iptable_nat nf_nat nf_conntrack_ipv4 nf_conntrack nf_defrag_ipv4 iptable_filter ip_tables x_tables joydev sp5100_tco edac_core i2c_piix4 serio_raw k8temp edac_mce_amd snd_hda_codec_hdmi snd_hda_intel snd_hda_codec snd_hwdep snd_pcm snd_timer snd soundcore parport_pc snd_page_alloc mac_hid shpchp lp parport radeon 8139too ttm drm_kms_helper drm pata_atiixp i2c_algo_bit usbhid hid wmi r8169
Jan  6 20:13:35 localhost kernel: [ 1096.188008] 
Jan  6 20:13:35 localhost kernel: [ 1096.188008] Pid: 2564, comm: zsh Not tainted 3.2.0-35-generic #55-Ubuntu Gigabyte Technology Co., Ltd. GA-MA785GM-US2H/GA-MA785GM-US2H
Jan  6 20:13:35 localhost kernel: [ 1096.188008] RIP: 0010:[<ffffffff8116589a>]  [<ffffffff8116589a>] kmem_cache_alloc+0x5a/0x140
Jan  6 20:13:35 localhost kernel: [ 1096.188008] RSP: 0018:ffff880059877d78  EFLAGS: 00010206
Jan  6 20:13:35 localhost kernel: [ 1096.188008] RAX: 0000000000000000 RBX: 00007f202c59d000 RCX: 000000000005b2ed
Jan  6 20:13:35 localhost kernel: [ 1096.188008] RDX: 000000000005b2ec RSI: 0000000000016da0 RDI: ffff88006d408a00
Jan  6 20:13:35 localhost kernel: [ 1096.188008] RBP: ffff880059877dc8 R08: ffff88006fa96da0 R09: 0000000000000001
Jan  6 20:13:35 localhost kernel: [ 1096.188008] R10: 0000000000100073 R11: ffff880059dbb2c0 R12: ffff88006d408a00
Jan  6 20:13:35 localhost kernel: [ 1096.188008] R13: 2665c4979a04b7b8 R14: ffffffff811447c5 R15: 00000000000080d0
Jan  6 20:13:35 localhost kernel: [ 1096.188008] FS:  00007f202c5ac700(0000) GS:ffff88006fa80000(0000) knlGS:0000000000000000
Jan  6 20:13:35 localhost kernel: [ 1096.188008] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Jan  6 20:13:35 localhost kernel: [ 1096.188008] CR2: 00000000025991f0 CR3: 0000000059dbc000 CR4: 00000000000006e0
Jan  6 20:13:35 localhost kernel: [ 1096.188008] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
Jan  6 20:13:35 localhost kernel: [ 1096.188008] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Jan  6 20:13:35 localhost kernel: [ 1096.188008] Process zsh (pid: 2564, threadinfo ffff880059876000, task ffff88006b6b5c00)
Jan  6 20:13:35 localhost kernel: [ 1096.188008] Stack:
Jan  6 20:13:35 localhost kernel: [ 1096.188008]  0000000000000001 0000000000001000 0000000000000001 ffffffff8129e2e0
Jan  6 20:13:35 localhost kernel: [ 1096.188008]  0000000000000001 00007f202c59d000 ffff88006822f480 0000000000000001
Jan  6 20:13:35 localhost kernel: [ 1096.188008]  0000000000001000 0000000000000000 ffff880059877e88 ffffffff811447c5
Jan  6 20:13:35 localhost kernel: [ 1096.188008] Call Trace:
Jan  6 20:13:35 localhost kernel: [ 1096.188008]  [<ffffffff8129e2e0>] ? cap_vm_enough_memory+0x50/0x60
Jan  6 20:13:35 localhost kernel: [ 1096.188008]  [<ffffffff811447c5>] mmap_region+0x2a5/0x4f0
Jan  6 20:13:35 localhost kernel: [ 1096.188008]  [<ffffffff81144d58>] do_mmap_pgoff+0x348/0x360
Jan  6 20:13:35 localhost kernel: [ 1096.188008]  [<ffffffff81144eb1>] sys_mmap_pgoff+0x141/0x230
Jan  6 20:13:35 localhost kernel: [ 1096.188008]  [<ffffffff81018b12>] sys_mmap+0x22/0x30
Jan  6 20:13:35 localhost kernel: [ 1096.188008]  [<ffffffff816655c2>] system_call_fastpath+0x16/0x1b
Jan  6 20:13:35 localhost kernel: [ 1096.188008] Code: 00 4d 8b 04 24 65 4c 03 04 25 50 da 00 00 49 8b 50 08 4d 8b 28 4d 85 ed 0f 84 d8 00 00 00 49 63 44 24 20 49 8b 34 24 48 8d 4a 01 <49> 8b 5c 05 00 4c 89 e8 65 48 0f c7 0e 0f 94 c0 84 c0 74 c2 4d 
Jan  6 20:13:35 localhost kernel: [ 1096.188008] RIP  [<ffffffff8116589a>] kmem_cache_alloc+0x5a/0x140
Jan  6 20:13:35 localhost kernel: [ 1096.188008]  RSP <ffff880059877d78>
Jan  6 20:13:35 localhost kernel: [ 1096.274513] ---[ end trace 766ef1ef52f774ae ]---
Jan  6 20:13:37 localhost kernel: [ 1097.836149] BUG: Bad page state in process swapper/0  pfn:59a33
Jan  6 20:13:37 localhost kernel: [ 1097.838885] page:ffffea0001668cc0 count:0 mapcount:-1 mapping:          (null) index:0xffff880059a33160
Jan  6 20:13:37 localhost kernel: [ 1097.841673] page flags: 0x100000000000000()
Jan  6 20:13:37 localhost kernel: [ 1097.844440] Modules linked in: btrfs zlib_deflate libcrc32c ufs qnx4 hfsplus hfs minix ntfs vfat msdos fat jfs xfs reiserfs ext2 nfsd nfs lockd fscache auth_rpcgss nfs_acl sunrpc dm_crypt ppdev ipt_REJECT ipt_LOG ipt_MASQUERADE xt_state iptable_mangle iptable_nat nf_nat nf_conntrack_ipv4 nf_conntrack nf_defrag_ipv4 iptable_filter ip_tables x_tables joydev sp5100_tco edac_core i2c_piix4 serio_raw k8temp edac_mce_amd snd_hda_codec_hdmi snd_hda_intel snd_hda_codec snd_hwdep snd_pcm snd_timer snd soundcore parport_pc snd_page_alloc mac_hid shpchp lp parport radeon 8139too ttm drm_kms_helper drm pata_atiixp i2c_algo_bit usbhid hid wmi r8169
Jan  6 20:13:37 localhost kernel: [ 1097.856881] Pid: 0, comm: swapper/0 Tainted: G      D      3.2.0-35-generic #55-Ubuntu
Jan  6 20:13:37 localhost kernel: [ 1097.860020] Call Trace:
Jan  6 20:13:37 localhost kernel: [ 1097.863063]  <IRQ>  [<ffffffff8111fe8f>] bad_page.part.61+0x9f/0xf0
Jan  6 20:13:37 localhost kernel: [ 1097.866119]  [<ffffffff8111fef8>] bad_page+0x18/0x30
Jan  6 20:13:37 localhost kernel: [ 1097.869158]  [<ffffffff8112098e>] free_pages_prepare+0x10e/0x120
Jan  6 20:13:37 localhost kernel: [ 1097.872178]  [<ffffffff81120af9>] free_hot_cold_page+0x49/0x1a0
Jan  6 20:13:37 localhost kernel: [ 1097.875183]  [<ffffffff81120c7d>] __free_pages+0x2d/0x40
Jan  6 20:13:37 localhost kernel: [ 1097.878163]  [<ffffffff8159a8fb>] tcp_v4_destroy_sock+0x25b/0x2c0
Jan  6 20:13:37 localhost kernel: [ 1097.881105]  [<ffffffff81582695>] inet_csk_destroy_sock+0x55/0x140
Jan  6 20:13:37 localhost kernel: [ 1097.883970]  [<ffffffff815849b0>] tcp_done+0x50/0x90
Jan  6 20:13:37 localhost kernel: [ 1097.886853]  [<ffffffff81591d92>] tcp_rcv_state_process+0x422/0x5f0
Jan  6 20:13:37 localhost kernel: [ 1097.889724]  [<ffffffff8159a597>] tcp_v4_do_rcv+0xc7/0x1d0
Jan  6 20:13:37 localhost kernel: [ 1097.892513]  [<ffffffff8159c1f1>] tcp_v4_rcv+0x581/0x820
Jan  6 20:13:37 localhost kernel: [ 1097.895301]  [<ffffffff81577b60>] ? ip_rcv_finish+0x370/0x370
Jan  6 20:13:37 localhost kernel: [ 1097.898110]  [<ffffffff81577b60>] ? ip_rcv_finish+0x370/0x370
Jan  6 20:13:37 localhost kernel: [ 1097.900915]  [<ffffffff81577c3d>] ip_local_deliver_finish+0xdd/0x280
Jan  6 20:13:37 localhost kernel: [ 1097.903716]  [<ffffffff81577fa8>] ip_local_deliver+0x88/0x90
Jan  6 20:13:37 localhost kernel: [ 1097.906502]  [<ffffffff815778fd>] ip_rcv_finish+0x10d/0x370
Jan  6 20:13:37 localhost kernel: [ 1097.909279]  [<ffffffff815781e5>] ip_rcv+0x235/0x300
Jan  6 20:13:37 localhost kernel: [ 1097.912067]  [<ffffffff81613dc7>] ? packet_rcv_spkt+0x47/0x190
Jan  6 20:13:37 localhost kernel: [ 1097.914831]  [<ffffffff81543446>] __netif_receive_skb+0x4d6/0x550
Jan  6 20:13:37 localhost kernel: [ 1097.917624]  [<ffffffff81544230>] netif_receive_skb+0x80/0x90
Jan  6 20:13:37 localhost kernel: [ 1097.920415]  [<ffffffff81536474>] ? __netdev_alloc_skb+0x24/0x50
Jan  6 20:13:37 localhost kernel: [ 1097.923124]  [<ffffffffa00d6e90>] rtl8139_rx+0x150/0x2b0 [8139too]
Jan  6 20:13:37 localhost kernel: [ 1097.925754]  [<ffffffffa00d704a>] rtl8139_poll+0x5a/0xd0 [8139too]
Jan  6 20:13:37 localhost kernel: [ 1097.928274]  [<ffffffff81544bd4>] net_rx_action+0x134/0x290
Jan  6 20:13:37 localhost kernel: [ 1097.930698]  [<ffffffff8103df8b>] ? native_safe_halt+0xb/0x10
Jan  6 20:13:37 localhost kernel: [ 1097.933115]  [<ffffffff8106f6e8>] __do_softirq+0xa8/0x210
Jan  6 20:13:37 localhost kernel: [ 1097.935495]  [<ffffffff810967f5>] ? do_timer+0x25/0x30
Jan  6 20:13:37 localhost kernel: [ 1097.937836]  [<ffffffff81035dc2>] ? ack_apic_level+0x72/0x190
Jan  6 20:13:37 localhost kernel: [ 1097.940163]  [<ffffffff8166782c>] call_softirq+0x1c/0x30
Jan  6 20:13:37 localhost kernel: [ 1097.942464]  [<ffffffff81016305>] do_softirq+0x65/0xa0
Jan  6 20:13:37 localhost kernel: [ 1097.944778]  [<ffffffff8106face>] irq_exit+0x8e/0xb0
Jan  6 20:13:37 localhost kernel: [ 1097.947068]  [<ffffffff816680e3>] do_IRQ+0x63/0xe0
Jan  6 20:13:37 localhost kernel: [ 1097.949327]  [<ffffffff8165d46e>] common_interrupt+0x6e/0x6e
Jan  6 20:13:37 localhost kernel: [ 1097.951597]  <EOI>  [<ffffffff8103df8b>] ? native_safe_halt+0xb/0x10
Jan  6 20:13:37 localhost kernel: [ 1097.953891]  [<ffffffff810900a8>] ? hrtimer_start+0x18/0x20
Jan  6 20:13:37 localhost kernel: [ 1097.956171]  [<ffffffff8101c983>] default_idle+0x53/0x1d0
Jan  6 20:13:37 localhost kernel: [ 1097.958426]  [<ffffffff8101cb5d>] amd_e400_idle+0x5d/0x120
Jan  6 20:13:37 localhost kernel: [ 1097.960704]  [<ffffffff81013236>] cpu_idle+0xd6/0x120
Jan  6 20:13:37 localhost kernel: [ 1097.962970]  [<ffffffff816235ee>] rest_init+0x72/0x74
Jan  6 20:13:37 localhost kernel: [ 1097.965195]  [<ffffffff81cfbc03>] start_kernel+0x3b0/0x3bd
Jan  6 20:13:37 localhost kernel: [ 1097.967421]  [<ffffffff81cfb388>] x86_64_start_reservations+0x132/0x136
Jan  6 20:13:37 localhost kernel: [ 1097.969660]  [<ffffffff81cfb140>] ? early_idt_handlers+0x140/0x140
Jan  6 20:13:37 localhost kernel: [ 1097.971888]  [<ffffffff81cfb459>] x86_64_start_kernel+0xcd/0xdc

What's happening here? What can I do?


Source: (StackOverflow)

What is the systemctl equivalent

I am converting a package from .rpm to .deb using this tutorial. However, to test and debug the application I need to run it. The programs readme explains to run it as a service with:

systemctl enable progname.service
systemctl start progname.service

What is the equivalent on ubuntu for these commands?


Source: (StackOverflow)

Does changing the theme improve system performance?

I really have this feeling that after changing the theme on my Ubuntu (10.10 - but it also happened on a different version) the system is much quicker, or to say more precisely, the system is not loaded anymore. Maybe it's just a feeling and nothing more but I hope that I'm not the only one seeing this!


Source: (StackOverflow)

What are the common maintenance tasks?

When i was using windows, i used to run defrags, ccleaner and revouninstaller once a month to keep the system and the registry clean.

I know ubuntu (and all linux distro) has a different system structure and doesnt need defrags, but i've heard there are some mainenance tasks that help to keep the system clean (for example, sudo apt-get clean or sudo apt-get autoremove)

How many of those commands/software (and please explain what they do and if they can compromise the system stability) do you know and use regularly?


Source: (StackOverflow)

Will Ubuntu One support OS Settings sync?

Being new to Linux and to Ubuntu, I've taken quite some time to tune it to my needs on my netbook. As I'm now convinced by the OS, I plan to install it on my desktop in the next few days. I was hoping that with Ubuntu One, after a sync, I would find back all my settings on the newly installed machine : system settings, language, list of installed programs (to quickly reinstall the same set), email chat and microblog accounts, Unity launcher shortcuts, etc...

I've just read trought the Ubuntu One website and it seems such a settings-sync feature is not part of it. Is this something that could be done? Is it planned? Is there another way to achieve this same effect?

Thanks in advance for any infos on that.


Source: (StackOverflow)

Emacs-like keybindings system-wide?

Is there a way to set Emacs-like keyboard shortcuts (at least the subset mentioned below) for the whole OS? This is possible in some apps such as the terminal, Emacs (go figure :) and additionally through special plugins in some other apps (Eclipse), but I got so used to C-f-ing through text and never having to jump to arrows that I'd like to be able to do this system-wide so that I can do it whenever I'm typing - e.g. searching for songs in Rhythmbox, typing stuff into the dash or the HUD, writing mails in Thunderbird or Gmail... The combos I'm most interested in are:

  • C-f - forward
  • C-b - backwards
  • C-a - home
  • C-e - end
  • C-d - delete
  • C-k - delete line

(note for non-emacs users - C means Ctrl)


Source: (StackOverflow)

How to make my proxy settings change depending on the network I connect to?

My company's corporate network requires me to set a network proxy to access the net, but when I am anywhere else, I don't need it. The proxy settings in Ubuntu (System -> Preferences -> Proxy server) allowed me to create "locations" that I can manually select. Then I have a "default" location (with no proxy) and a "work" location (with my company's proxy in it).

Is there a way to make Ubuntu automatically select the "work" location based on the connection I'm using? I thought I could use the IP subnet (very specific) to detect where I am, but I have no idea how to set it up...

Edit: I really need to have the proxy settings set at the system level. All my network connections (IMAP, SMTP, chat, etc) need to go through the proxy. Not only the web browser.


Source: (StackOverflow)

Is there a way of leveling/compressing the sound system-wide?

As a Laptop user, I'm sure that a lot of people, even the ones using Netbooks would have already gone through this problem. Especially when listening to podcasts, and using it as an example, the sound might have loud moments and quiet moments, one person speaking loud and the other speaking very quiet in the same episode. Thereby, I always wanted the sound to be compressed system-wide, and I just noted the other day, that in Windows, some Realtek drivers already offer this function.

We have already a pulseaudio plugin for equalization system-wide, and although it still has problems like not letting us change its values and listen the change in real time, or cracking the sound while changing pulse volume, I do love it and use it. Now I'm just missing something to keep the sound around 0db (or near the volume level you're using) as a leveler plugin for pulseaudio.

Any suggestion?


Source: (StackOverflow)

Find (and reinstall) packages with corrupted files (without breaking anything)

I usually prefer to fix a Linux system than to reinstall from scratch. My computers have seen many distribution upgrades and a list of PPAs or third-party repositories. APT usually makes sure that everything works in the end. However, the fact that the package manager thinks that all required packages are 'installed' does not guarantee that all the files are present on the file system.

Such a such situation may occur if you have to work-around dependency problems with dpkg --force-*. One could also reproduce such a situation by deleting a file from /usr as root.

Is there a simple way to verify whether all files belonging to an installed package are present?

If a such a problem package is found, aptitude reinstall fixes the problem.


Source: (StackOverflow)

Security camera system server

I'd like to setup a Security Camera system which is captures and stores video streams into Ubuntu Server From 2 wireless Cameras.

  • Which type of motion-detecting wireless camera you suggested?

  • Are there any software to capture the videos on schedule time from the server?

  • And which software do i need to remote control the cameras?


Source: (StackOverflow)

How can I read system mail?

Which packages need to be installed in order for system mail to be generated from for example a nightly rkhunter scan run by cron?


Source: (StackOverflow)

How I do a system restore?

Problem I Faced

  • I installed something that crashed my Wifi drivers that I compiled earlier.
  • Un-installing the same package doesn't helped.
  • Finally, I re-compiled my wifi drivers and things are good.

My Question

But, is there anything like System Restore or System Rollback in Ubuntu/LinuxMint?

  • Is there anything that can undo an apt-get install package command?

Source: (StackOverflow)

What are the disadvantages of having a dot in a user name?

A student just asked what could be the downside of having a dot (. ) in the name of the user. For example: john.doe

How will this affect the system or any apps for that matter?


Source: (StackOverflow)