<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>my tech blog &#187; Notes to self</title>
	<atom:link href="http://billauer.se/blog/category/notes-to-self/feed/" rel="self" type="application/rss+xml" />
	<link>https://billauer.se/blog</link>
	<description>Anything I found worthy to write down.</description>
	<lastBuildDate>Thu, 12 Mar 2026 11:36:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>Linux: Command-line utilities for obtaining information</title>
		<link>https://billauer.se/blog/2019/07/linux-info-command-line/</link>
		<comments>https://billauer.se/blog/2019/07/linux-info-command-line/#comments</comments>
		<pubDate>Sun, 21 Jul 2019 10:32:12 +0000</pubDate>
		<dc:creator>eli</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Notes to self]]></category>
		<category><![CDATA[Server admin]]></category>
		<category><![CDATA[systemd]]></category>

		<guid isPermaLink="false">https://billauer.se/blog/?p=5776</guid>
		<description><![CDATA[There are many ways to ask a Linux machine how it&#8217;s doing. I&#8217;ve collected a few of them, mostly for my own reference. I guess I&#8217;ll add more items as I run across new ones. General Info inxi -Fxxxz (neat output, but makes the system send me security &#8220;password required&#8221; alert mails because of attempts [...]]]></description>
			<content:encoded><![CDATA[<p>There are many ways to ask a Linux machine how it&#8217;s doing. I&#8217;ve collected a few of them, mostly for my own reference. I guess I&#8217;ll add more items as I run across new ones.</p>
<h3>General Info</h3>
<ul>
<li>inxi -Fxxxz (neat output, but makes the system send me security &#8220;password required&#8221; alert mails because of attempts to execute hddtemp).</li>
<li>hwinfo</li>
<li>lshw</li>
<li>Temperature and fans: sensors</li>
<li>hostnamectl (host name, kernel version, Distribution etc.)</li>
<li>dmidecode: Lots of info on and by the BIOS (From computer model an make down to exact part number of installed DIMM memories etc.)</li>
</ul>
<h3>Status</h3>
<ul>
<li>Logs: journalctl and dmesg</li>
<li>systemctl, with all its variants</li>
<li>Network: ifconfig</li>
<li>Wifi: iwconfig</li>
<li>Bluetooth: hciconfig, bluetootctl, btmon (for dumping traffic)</li>
<li>CPU: lscpu</li>
<li>PCI bus: lspci</li>
<li>USB: lsusb</li>
<li>RAID: mdadm &#8211;detail /dev/md0</li>
</ul>
<h3>Operating system</h3>
<ul>
<li>List open files: lsof</li>
<li>Memory usage: free, lsmem and read /proc/buddyinfo</li>
<li>Various kernel statistics (including memory): vmstat (takes info from /proc/stat and /proc/meminfo in particular)</li>
<li>Block devices and partitions: blkid and lsblk</li>
<li>List namespaces: lsns</li>
<li>List loaded kernel modules: lsmod</li>
<li>List locks: lslocks</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>https://billauer.se/blog/2019/07/linux-info-command-line/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Making a mirror of a WordPress blog on my own computer</title>
		<link>https://billauer.se/blog/2017/01/local-mirror-wordpress/</link>
		<comments>https://billauer.se/blog/2017/01/local-mirror-wordpress/#comments</comments>
		<pubDate>Sun, 29 Jan 2017 06:34:49 +0000</pubDate>
		<dc:creator>eli</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Notes to self]]></category>
		<category><![CDATA[Server admin]]></category>

		<guid isPermaLink="false">https://billauer.se/blog/?p=5068</guid>
		<description><![CDATA[This is a note to self on how to create a mirror copy of this blog on my own computer. My own peculiar methods are all over. Create a virtual host on my apache httpd server (port 99) Uncompress the site&#8217;s entire public_html directory into the virtual host site&#8217;s root directory (that&#8217;slazy, I got a [...]]]></description>
			<content:encoded><![CDATA[<p>This is a note to self on how to create a mirror copy of this blog on my own computer. My own peculiar methods are all over.</p>
<ul>
<li>Create a virtual host on my apache httpd server (port 99)</li>
<li>Uncompress the site&#8217;s entire public_html directory into the virtual host site&#8217;s root directory (that&#8217;slazy, I got a lot of unnecessary files this way)</li>
<li>Create a git repo, and add the blog/ directory so I have a look on what happens (not really necessary, but I make git repos everywhere)</li>
<li>Create a new database, and fill it with an SQL backup of the site:
<pre>$ mysql -D blogmirror &lt; ~/Desktop/blogdb-Mon_17.01.23-05.23.sql</pre>
</li>
<li>Change the database settings in wp_config.php. For a local database, which requires no password, it became (DB_HOST remained &#8220;localhost&#8221;):
<pre>define('DB_NAME', 'blogmirror');

/** MySQL database username */
define('DB_USER', 'eli');

/** MySQL database password */
define('DB_PASSWORD', '');</pre>
</li>
<li>Change WordPress&#8217; view of the blog&#8217;s root (following <a href="https://codex.wordpress.org/Changing_The_Site_URL" target="_blank">this post</a>), or it diverts from the allocated port 99. Add the following two lines to wp_config.php:
<pre>define('WP_HOME','http://10.10.10.10:99/blog');
define('WP_SITEURL','http://10.10.10.10:99/blog');</pre>
<p>Note that there&#8217;s no trailing slash. Adding one makes double slashes on the URLs generated by WordPress.</li>
</ul>
<p>That&#8217;s it. At this point the blog worked. Log in with the same user and password as the real blog.</p>
<h3>Automatic upgrade of the mirror</h3>
<p>Create a new user, sitemirror, but don&#8217;t create the user&#8217;s home directory. Instead, edit /etc/passwd to set the home directory at the site&#8217;s root directory (not the public_html, but where public_html can be found).</p>
<p>Also, change the ownership of that directory to that user, or the modification through ftp won&#8217;t work:</p>
<pre># chown -R sitemirror sitemirror/</pre>
<p>And start the ftp service (it doesn&#8217;t matter that the WordPress has an SFTP option. It goes for regular port 21 anyhow):</p>
<pre># service vsftpd start</pre>
<p>Also, make the path accessible to the sitemirror user (in my case, it meant making the home directory accessible to all. Temporarily!)</p>
<p>Now, on the automatic upgrade page, go for localhost and the username/password of the ad-hoc sitemirror user.</p>
<p>And you get something like this:</p>
<p><a href="https://billauer.se/blog/wp-content/uploads/2017/01/Screenshot.png"><img class="aligncenter size-medium wp-image-5070" title="Screenshot after upgrading" src="https://billauer.se/blog/wp-content/uploads/2017/01/Screenshot-300x165.png" alt="Screenshot after upgrading" width="300" height="165" /></a></p>
<p>&nbsp;</p>
<p>And now revert the damage made above: Shut down vsftpd (and verify port 21 is closed), fix the ownership of the sitemirror directory, and restore the ownership of the home directory.</p>
<p>Then remove the sitemirror user (but not its home directory, obviously).</p>
<p>This is for upgrading the local mirror blog. On the real blog, it was just clicking on the button for upgrading. No questions asked about FTP or anything like that.</p>
<p>But the irony is that after upgrading (to 4.7.2), I attempted to publish this post, but &#8220;Publish&#8221; button was inactive, and the editor stuck on &#8220;Saving Draft&#8230;&#8221;. To double the irony, I upgraded just because one has to, as a security measure. All was fine.</p>
<p>Oddly enough, I didn&#8217;t have a similar problem with the (upgraded) mirrored blog.</p>
<p>I wrote a <a href="https://billauer.se/blog/2017/01/disable-autosave-wordpress/" target="_blank">separate post</a> on how I worked around this issue.</p>
<p>How I love upgrading. Actually, I love downgrading more.</p>
]]></content:encoded>
			<wfw:commentRss>https://billauer.se/blog/2017/01/local-mirror-wordpress/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Manual wireless setting on Fedora 12</title>
		<link>https://billauer.se/blog/2017/01/iwconfig-wlan-wireless/</link>
		<comments>https://billauer.se/blog/2017/01/iwconfig-wlan-wireless/#comments</comments>
		<pubDate>Fri, 27 Jan 2017 07:57:00 +0000</pubDate>
		<dc:creator>eli</dc:creator>
				<category><![CDATA[emergency]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Notes to self]]></category>

		<guid isPermaLink="false">https://billauer.se/blog/?p=5059</guid>
		<description><![CDATA[What&#8217;s this? This is a note for myself, in case I need a quick replacement for my ADSL connection on the desktop computer (Fedora 12, and oldie). It may seem paradoxical that I&#8217;ll read this in order to access the internet (&#8230;), but this is probably where I would look first. With my cellphone, which [...]]]></description>
			<content:encoded><![CDATA[<h3>What&#8217;s this?</h3>
<p>This is a note for myself, in case I need a quick replacement for my ADSL connection on the desktop computer (Fedora 12, and oldie). It may seem paradoxical that I&#8217;ll read this in order to access the internet (&#8230;), but this is probably where I would look first. With my cellphone, which is also the temporary access point, that is.</p>
<p>In short, there&#8217;s a lot of stuff here particular to my own computer.</p>
<p>I&#8217;m using the small TP-LINK dongle (TL-WN725N), which is usually doing nothing in particular.</p>
<h3>Notes to self</h3>
<ul>
<li><span style="color: #ff0000;"><strong>This post is also on your local blog</strong></span> (copy-paste commands&#8230;)</li>
<li>wlan1 is the Access Point dongle (maybe use it instead&#8230;?)</li>
<li>Put the phone in the corner next to the door (that&#8217;s where I get a 4G connection) once the connection is established&#8230;</li>
<li>&#8230; but not before that, so you won&#8217;t run back and forth</li>
</ul>
<h3>Setting up the interface</h3>
<pre># service ADSL off
# /etc/sysconfig/network-scripts/firewall-wlan0
# ifconfig wlan0 up
# wpa_supplicant -B -Dwext -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf
ioctl[SIOCSIWAP]: Operation not permitted
# iwlist wlan0 scan
wlan0     Scan completed :
          Cell 01 - Address: 00:34:DA:3D:F8:F5
                    ESSID:"MYPHONE"
                    Protocol:IEEE 802.11bgn
                    Mode:Master
                    Frequency:2.462 GHz (Channel 11)
                    Encryption key:on
                    Bit Rates:108 Mb/s
                    Extra:rsn_ie =30140100000fac040100000fac040100000fac020c00
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : CCMP
                        Pairwise Ciphers (1) : CCMP
                        Authentication Suites (1) : PSK
                    IE: Unknown: DD5C0050F204104A0001101044000102103B00010310470010A7FED45DE0455F5DB64A55553EB96669102100012010230001201024000120104200012010540008000000000000000010110001201008000221481049000600372A000120
                    Quality:0  Signal level:0  Noise level:0

# iwconfig wlan0 essid MYPHONE
# dhclient wlan0 &amp;</pre>
<p>Note that wpa_supplicant complained, and it was still fine. Use the -d or -dd flags for some debugging info.</p>
<p>It seems like the iwconfig is redundant, as wpa_supplicant handles this, thanks to the &#8220;scan_ssid=1&#8243; attribute in the config entry (?). The DHCP client isn&#8217;t redundant, because the routing table isn&#8217;t set correctly without it (making wlan0 the default gateway)</p>
<h3>Shutting down</h3>
<ul>
<li>Kill wpa_supplicant (it was run as a daemon)</li>
<li>Kill DHCP client:
<pre># dhclient -r</pre>
</li>
<li>Restart networking
<pre># service network restart
# service firewall restart
# service ADSL start</pre>
</li>
</ul>
<h3>WPA supplicant config file</h3>
<p>The WPA supplicant scans wlan0 and finds matching SSIDs. If such is found, it sends the password. Looks like it handles the association.</p>
<p>/etc/wpa_supplicant/wpa_supplicant.conf should read:</p>
<pre>ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel

network={
  ssid="MYPHONE"
  scan_ssid=1
  key_mgmt=WPA-PSK
  psk="MYPASSWORD"
}</pre>
<p>(it&#8217;s already this way)</p>
]]></content:encoded>
			<wfw:commentRss>https://billauer.se/blog/2017/01/iwconfig-wlan-wireless/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
