LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Blogs > Musings on technology, philosophy, and life in the corporate world
User Name
Password

Notices


Hi. I'm jon.404, a Unix/Linux/Database/Openstack/Kubernetes Administrator, AWS/GCP/Azure Engineer, mathematics enthusiast, and amateur philosopher. This is where I rant about that which upsets me, laugh about that which amuses me, and jabber about that which holds my interest most: *nix.
Rate this Entry

LOC hilarity

Posted 01-09-2015 at 05:35 PM by rocket357
Updated 01-09-2015 at 05:47 PM by rocket357 (I can't English)

In a discussion on openbsd's tech@ mailing list, it was determined that ntpd-4.2.8 contained approximately 190k lines of code...a count that came up after the 8 vulnerabilities in ntpd were recently announced.

(DISCLAIMER: lines of code are difficult to count fairly, especially comparing one product to another, but this gives a rough "ballpark" idea of LOC).

Let's see if I can put this in perspective. ntpd checks and sets the time on a machine. In a nutshell, that is ntpd. It can also serve time to other machines on the internet.

OpenSSH? Well, it does a great deal of crypto, plus it facilitates logins, handles key material safely, performs privilege separation, allows proxy capabilities, etc... It's quite a versatile project, IMHO. OpenSSH's LOC count? 56k. (By comparison, OpenNTPD accomplishes arguably the same functionality as ntpd (including serving time on the internet), and it weighs in under 3k LOC).

Let's put this further into perspective. OpenBSD-5.6-STABLE (the uhh, complete OS, or more properly defined, the kernel + libs + userland across ~20 architectures...the official src repo *minus* the toolchain (GCC + friends)) is 3.5 million LOC (1.8 million in the kernel alone). That means ntpd, a program to check and set the time on your machine, is over 5% the size of an entire operating system (all ~20 architectures of it)...ntpd is over 10% of the size of the userland + libs on OpenBSD. (By the way, gcc/binutils/etc...flops in at a whopping 3.8 million LOC...over half of the src repo is the toolchain =\ ).

And, just for good fun, the 3.19-rc3 linux kernel is 10.7 million LOC =)

Ok, maybe ntpd isn't that bad afterall...
Posted in Uncategorized
Views 1321 Comments 0
« Prev     Main     Next »
Total Comments 0

Comments

 

  



All times are GMT -5. The time now is 06:58 PM.

Main Menu
Advertisement
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration