Centroid.EU Blog

(this blog is mostly encrypted - adults only)
  

Previous Page


Facilities and Priorities in syslog

November 4th, 2013

We had this problem in that we didn't know what facility a certain program was syslogging to, so we straced it (in linux), check a sample here:

root@raspberrypi:~# tail /tmp/blah.out
read(1, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\1\0\0\0\0"..., 4096) = 118
_llseek(1, -6, [112], SEEK_CUR)         = 0
read(1, "\nUTC0\n", 4096)               = 6
close(1)                                = 0
munmap(0xb6caf000, 4096)                = 0
socket(PF_FILE, SOCK_DGRAM|SOCK_CLOEXEC, 0) = 1
connect(1, {sa_family=AF_FILE, path="/dev/log"}, 110) = 0
send(1, "<13>Nov  3 00:00:14 pi: hi", 26, MSG_NOSIGNAL) = 26
close(1)                                = 0
exit_group(0)                           = ?
That was produced with the input "strace -o blah.out logger hi". So syslog logs a number inside <> at the beginning to indicate what facility and priority it is. It's sorta a code. So I wrote the following BSD program to convert the number into their respective fac and pri. Enjoy!
root@raspberrypi:/tmp# ./facility 13
facility: (8)user, priority: (5)notice

For administrivia, how would you speed up this program? Take a look at /usr/include/syslog.h and think binary search.

0 comments

Jupiter (computer) now on Radeon

November 3rd, 2013

After 3.5 years of Nvidia, the box is now running a low to medium end Sapphire Radeon HD5450 card. I'm saving a ton of electricity with this card too! And OpenBSD is fast again! Wonders!

0 comments

Fast Hellos are on

November 1st, 2013

Yesterday I turned on fast hellos on my OSPF setup. This is what venus' ospfd.conf file looks like now:

... some cut ...
area 0.0.0.0 {
        interface gif0 {
                router-priority 1
                metric 1
                router-dead-time 40
                auth-type simple
                auth-key $password
                router-dead-time minimal
                fast-hello-interval msec 333
        }
        interface gif1 {
                router-priority 5
                metric 10
                router-dead-time 40
                auth-type simple
                auth-key $password
                router-dead-time minimal
                fast-hello-interval msec 333
        }
}
Notice gif0 has a lower metric than gif1, fast-hello-interval time is 333 msecs.Which is also default so it needn't be there. The "router-dead-time minimal" causes fast hellos to go on. So when I watch the packets on gif1 which isn't used for traffic I see:
# netstat -nw 1 -I gif1
 gif1 in       gif1 out              total in      total out            
 packets  errs  packets  errs colls   packets  errs  packets  errs colls
  200827     0   209273     0     0  75406364     0 80678099     0     0
       3     0        3     0     0        29     0       29     0     0
       3     0        3     0     0        22     0       22     0     0
...
exactly 3 packets per second in either direction. I suspect now that when my LTE fritz!box crashes again that the failover to the gif1 link will be next to instant.

0 comments

OpenBSD 5.4 released

November 1st, 2013

You can now download OpenBSD 5.4 from your favourite OpenBSD FTP mirror. I usually use ftp.eu.openbsd.org in europe but if I was in north america I'd use ftp.openbsd.org. Congratulations to the OpenBSD team for yet another great release!

0 comments

Centroid blog now available in CVS

November 1st, 2013

I have decided to open source the PHP behind this blog. It's all about letting go and showing the innards isn't it? :-) Anyhow here are the sources. This PHP source code has never seen anyone's eyes but mine before this. Perhaps it's not great but it makes this blog the way it is.

0 comments

A tiny blip on the W commit log screen

October 30th, 2013

Wildcarddnsd didn't get much commit time this year. But this time there was something. I committed support for Raspberry Pi running raspbian. That's gotta count for something, however small. Have fun with it!

0 comments

Nvidia Card about to be replaced

October 29th, 2013

I have purchased a Sapphire Radeon HD5450 graphics card. This card will replace my MSI N250GTS Twin Frozr 1G 1GB DDR3 card that I originally bought with Jupiter. I hope they are comparable in performance. Just that the Radeon doesn't do 2 monitors which the Nvidia card did. But since I don't do such a setup it should be fine.

0 comments

All computers upgraded to OpenBSD 5.4

October 29th, 2013

It's such a joy to upgrade OpenBSD. /bsd.rd and sysmerge followed by a pkg_add -u. I have upgraded jupiter, luna, uranus and venus all to 5.4. And there is no errata54 yet. Perfect! Fallout hasn't been noticed except that the nvidia driver (nv) for OpenBSD 5.4 sucks. I'm considering buying a new AMD Radeon graphics card in the 60-80 euros range. Since my nvidia card is fairly old in model number a new card in that price range will probably be compatible in performance like before.

0 comments

My OSPF Network

October 27th, 2013

I have finally set everything up like I want it to. And so far I have not created a packetstorm, but who knows what's next. So here is my OSPF Network the best I can explain it:

                                        +----------------+
Luna &                                  | Fritz!Box LTE  |======= LTE Network
Gaia      Jupiter                       +----------------+
    ||      ||                                 ||
    ||      ||                                 ||
    ||      ||   }-------- Wifi -------{       ||
    ||      ||   }-------- IPSEC ------{       ||
    ||      ||                                 ||
 +---------------+ gif0  area 0.0.0.0   +--------------+
 |               |======================|              |     +--------+
 |    Uranus     |                      |     Venus    |=====| phone 2|
 |               | gif1  area 0.0.0.1   |              |     +--------+
 |               |======================|              |
 +---------------+                      +--------------+
    ||      ||                                 ||
    ||      ||                                 || 
    ||      ||                                 || Static default route
    ||      ||                                 ||
    ||      ||                                 ||
Phone #1  Open                          +----------------+
                                        |Fritz!Box DSL   |======= DSL Network
                                        +----------------+
Venus' ospfd.conf
password="secret"
 router-id 0.0.0.0
redistribute static
redistribute 0.0.0.0/0
area 0.0.0.0 {
        interface gif0 {
                router-priority 1
                auth-type simple
                auth-key $password
        }
}
area 0.0.0.1 {
        interface gif1 {
                router-priority 5
                auth-type simple
                auth-key $password
        }
}
Uranus' ospfd.conf
password="secret"
router-id 0.0.0.1
fib-update yes
redistribute 192.168.32.0/24
redistribute 192.168.33.0/24
redistribute 192.168.34.0/24
redistribute 192.168.35.0/24
redistribute 192.168.36.0/24
redistribute 192.168.1.0/24
redistribute 192.168.2.0/24
area 0.0.0.0 {
        interface gif0 {
                router-priority 10
                auth-type simple
                auth-key $password
        }
}
area 0.0.0.1 {
        interface gif1 {
                router-priority 5
                auth-type simple
                auth-key $password
        }
}

If there is any hints on how to improve on this it'd be appreciated.

0 comments

OpenBSD 5.4 Arrived!

October 26th, 2013

OpenBSD 5.4 arrived. Thank you OpenBSD Europe! And thank you OpenBSD!

0 comments

Next Page

Search

RSS Feed

Click here for RSS

On this day in

Other links

Have feedback?

By clicking on the header of an article you will be served a cookie. If you do not agree to this do not click on the header. Thanks!

Using a text-based webbrowser?

... such as lynx? Welcome back it's working again for the time being.

Older Blog Entries


Powered by BCHS