I can't seem to find too many references online about out of band management in desktops. Does such a thing exist aside from Wake On LAN, etc?
atx's questions
Usually we would use parted or fdisk to create a new partition, but in my case I want to do this non-interactively in a script. An interactive fdisk session would look like this:
# fdisk /dev/sdb
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-13054, default 1): [[ENTER]]
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-13054, default 13054): [[ENTER]]
Using default value 13054
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
# fdisk -l /dev/sdb
Disk /dev/sdb: 107.4 GB, 107374182400 bytes
255 heads, 63 sectors/track, 13054 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x7a0ce571
Device Boot Start End Blocks Id System
/dev/sdb1 1 13054 104856223+ 83 Linux
The closest I can get is with the following where the cylinders don't line up to 13054, the specified maximum:
# parted -s -- /dev/sdb mklabel msdos
# parted -s -- /dev/sdb mkpart primary ext3 1 -1
# fdisk -l /dev/xvdb
Disk /dev/sdb: 107.4 GB, 107374182400 bytes
255 heads, 63 sectors/track, 13054 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000d3807
Device Boot Start End Blocks Id System
/dev/sdb1 1 13055 104856576 83 Linux
So the standard ways to do this are using parted, echoing commands to fdisk or using a here document passed to sfdisk. Are there other ways to create a single partition using the maximum amount of cylinders?
EDIT: It looks like passing '-a cylinder' causes parted to behave exactly like fdisk. But passing '-a optimal' is...based on disk topology optimally? Can anyone explain this? Why does fdisk align to cylinders and not 'optimally'?
As the title suggests, is there a way of being notified of recently opened sockets using inotify/inotify-tools? As far as I can tell inotify only works with inodes and specifically testing if those inodes are sockets isn't something that inotify is actually capable of. Further to that, I can't seem to find where sockets FD's are stored. I can only see their file descriptors which are symlinks:
# ls -l /proc/29711/fd/10
lrwx------ 1 root root 64 Mar 6 17:04 /proc/29711/fd/10 -> socket:[750728]
# stat /proc/29711/fd/10
File: `/proc/29711/fd/10' -> `socket:[750728]'
Size: 64 Blocks: 0 IO Block: 1024 symbolic link
Device: 3h/3d Inode: 759700 Links: 1
Access: (0700/lrwx------) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2013-03-06 17:05:22.690411801 +1100
Modify: 2013-03-06 17:04:14.062414880 +1100
Change: 2013-03-06 17:04:14.062414880 +1100
Birth: -
I have a valid certificate installed on a server and when using the -CApath option with OpenSSL, the certificate chain is valid. However if I don't provide the -CApath option I receive this:
19:self signed certificate in certificate chain
When I try Google's HTTPS port without -CApath, OpenSSL returns:
20:unable to get local issuer certificate
What's the difference between the two?
Title says it all. This is a fresh Fedora 17 system running on a Xen hypervisor. No idea why it won't start
[root@box~] uname -a
Linux box.localhost 3.5.4-2.fc17.i686.PAE #1 SMP Wed Sep 26 22:10:23 UTC 2012 i686 i686 i386 GNU/Linux
[root@box~] cat /etc/redhat-release
Fedora release 17 (Beefy Miracle)
[root@box~] systemctl enable httpd.service
ln -s '/usr/lib/systemd/system/httpd.service' '/etc/systemd/system/multi-user.target.wants/httpd.service'
[root@box~] systemctl start httpd.service
Job failed. See system journal and 'systemctl status' for details.
[root@box~] systemctl status httpd.service
httpd.service - The Apache HTTP Server (prefork MPM)
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled)
Active: failed (Result: exit-code) since Fri, 19 Oct 2012 22:43:37 -0500; 3s ago
Process: 18225 ExecStart=/usr/sbin/httpd $OPTIONS -k start (code=exited, status=226/NAMESPACE)
CGroup: name=systemd:/system/httpd.service
Oct 19 22:43:37 box.localhost systemd[18225]: Failed at step NAMESPACE spawning /usr/sbin/httpd: No such file or directory
[root@box~] ls -al /usr/sbin/httpd
-rwxr-xr-x 1 root root 343496 Apr 30 04:56 /usr/sbin/httpd
Networked applications like rsync and scp can tab complete when they are enabled with bash. But what if you want local tab completion without remote tab completion? Is it possible?
When vim uses the shell given a colon !command, it does so through the /tmp filesystem. How do you force vim to use ~/.vim/tmp/ instead? It also uses /tmp for help files when zcat is required to read some of the manuals.
TMPDIR doesn't work for this case.
If eAccelerator uses an opcode cache for PHP requests, then why don't all companies employ this on their production servers? Is there a reason why Apache/PHP/mod_php doesn't bundle it with their package?
Why do SOA records use a '.' instead of an '@' for contact email addresses?
There is a very annoying header in mail sent by the the Postfix daemon and I'm looking for a way to get rid of it:
Received: by somedomain.net (Postfix, from userid 509)
Somewhat off topic, but is it also possible to remove the hostname from the Message-ID, leaving only the domain?
Message-ID: <[email protected]>