- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Is C programming neccesary to be UNIX Admin
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2004 06:20 AM
05-13-2004 06:20 AM
Is C programming neccesary to be UNIX Admin
I am curious to know if you feel C programming is neccessary to be a UNIX Admin? I know shell scripting is (basically, I can read it.. writing becomes a problem)....
And is there any good method to start "re-learning"
also I would like to compliment this forum, out of all the ones a frequent this is by far the best one... I may not post to often but I know I can always find answer here for most of the issues I have come across.
I have learned quite a bit just by reading the post..
and I would like to say Thank You for what I have learned and for what your experiences have taught me, the time it has saved me and even for saving me from support calls...
Sincere Regards,
Allen DuBeau...
P.S -
I wish I had an award to give for best UNIX forum, this one would win hands down!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2004 06:26 AM
05-13-2004 06:26 AM
Re: Is C programming neccesary to be UNIX Admin
I would say it's not necessary. I'm sure it would be a nice skill to have but not absolutely necessary.
And you're right about this forum - it's the best!!!
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2004 06:29 AM
05-13-2004 06:29 AM
Re: Is C programming neccesary to be UNIX Admin
I learned C after I had already been an admin for a few years.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2004 06:33 AM
05-13-2004 06:33 AM
Re: Is C programming neccesary to be UNIX Admin
As far as shell scripting goes, HP does offer a class or two on POSIX shell scripting. I would start with that if possible. There are numerous online resources for scripting as well.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2004 06:54 AM
05-13-2004 06:54 AM
Re: Is C programming neccesary to be UNIX Admin
Shell scripting and Perl is where you should focus on. Again, this is one of those questions that depends on what you are comfortable with.
As far as learning - either pickup a book and/or take a course. I just finished "Perl Scripting" - online via RAIL:
http://www.hp.com/education/courses/h4311s.html
You get the latest O'rielly "Programming Perl" book when you register.
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2004 06:55 AM
05-13-2004 06:55 AM
Re: Is C programming neccesary to be UNIX Admin
However, learning C gives you an insight into how so much of Unix actually works. It helps you understand some of the gibberish that goes on on the Linux kernel mailing lists too :)
It is a useful string to your bow but it's relevance to administration is far diminished these days.
Scripting is far more useful, especially perl. There are very few systems tasks where perl isn't a first choice over C these days.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2004 07:06 AM
05-13-2004 07:06 AM
Re: Is C programming neccesary to be UNIX Admin
You do need to know shell scripting, sh or ksh or posix shell. Read a good book about the shell, especially quoting ;-).
Perl becomes more important. Unfortunately some perl programs are hard to read and perl is a more complete and complex programming language.
I think one needs a training / course to learn perl.
JP.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2004 07:16 AM
05-13-2004 07:16 AM
Re: Is C programming neccesary to be UNIX Admin
I will assign points based on the shell scripting answers and/or suggestions....
How about this question, is it possible to be a very good administrator without being a shell scripting expert?
Thanks again...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2004 07:23 AM
05-13-2004 07:23 AM
Re: Is C programming neccesary to be UNIX Admin
I know some extremely good administrators who wouldn't know a shell script from a packet of mixed nuts. However, they will always be slightly less useful than one who knows scripting. Administration is not just about understanding the OS. You need to maintain environments for applications too. Apps like backup software or some weird app somebody threw on the machine three years ago. Often Scripting is nearly always required to keep these things going. From pre-exec and post-exec backup scripts to funky monitoring solutions, through to converting data from an old app to fit some hair brained new app, scripting makes you more complete.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2004 07:31 AM
05-13-2004 07:31 AM
Re: Is C programming neccesary to be UNIX Admin
> How about this question, is it possible to be a very good administrator without being a shell scripting expert?
Only if you know PERL very well!
Mind you, supposedly there are lots of good windows administrators out there that never use a script... but I can not live without my commandlines and scripts myself.
The relation C - Perl is not too clear in my mind. On the one hand, knowing C first made it easy for me to work with printf and loop constructs and so on. On the other hand, knowing C you are tempted to _think_ you know perl already but end up writing C program using perl. It is probably better to learn Perl without knowing C, to have an open mind about perl's many feartures and powerful build-ins.
fwiw,
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2004 07:34 AM
05-13-2004 07:34 AM
Re: Is C programming neccesary to be UNIX Admin
As for shell programming, I'd say it's much more important by far. However, how much you end up having to do it really depends on your environment. Until my current job that I started in January, I probably wrote half a dozen shell scripts in my career. (Not because I didn't know how, but because there weren't a lot of repetative tasks where I was... only a few servers configured for different applications and not much common between them.) In the new job, I've written more than a dozen scripts in four months.
POSIX (or Korn or Bourne since they are all nearly identical) is a must. I'm sure HP's classes are good, but you can learn as much a lot cheaper by buying a book (O'Reilly makes some of the best computer books I've seen) and sit at a system to figure out how to do things you want done or to do exercises. Really depends how you learn best though.
As for perl, it's very powerful and has it's place, but despite some perl-heads' ideas isn't the answer to all scripting situations, IMO. :) I haven't done a lot with it, but got the entire O-Reilly library on perl topics when I was creating a CGI interface that needed to talk to an Oracle database (something you definitely can't do effectively with the other shells) in the previous job. Perl mostly just boggles my mind though when I see it. :)
Jeff Traigle
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2004 07:40 AM
05-13-2004 07:40 AM
Re: Is C programming neccesary to be UNIX Admin
You need basic knowledge about shell scripting but not to be an expert. I belive most system administrators don't write much scripts.
Some bacic knowledge about awk will not hurt.
If you want to learn a more advanced tool you should go for perl.
C and C++ is for developers, not for system administrators.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2004 07:42 AM
05-13-2004 07:42 AM
Re: Is C programming neccesary to be UNIX Admin
Probably the biggest advantage for an admin knowing some C is that one is much better equipped to understand the underlying UNIX system calls and what can cause a certain errno value to be set. That is a huge advantage in tracking down obscure problems.
Moreover, UNIX really is the system calls so if you don't know C, you really don't know the system calls. Knowing C gives you a fundamental understanding of what fork()'ing, exec()'ing, and wait()'ing really do as well as understanding signal handlers (traps). This knowledge leads to much better shell and Perl programming as well.
I'll give you one more. Suppose a programmer comes to you and says, the stack is too small. I need it to be 512MB so my program will run? Is this reasonable? Could you ask the questions to find out if this is reasonable? If you were reasonably proficient in C in a UNIX environment, I assure you that you could.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2004 07:43 AM
05-13-2004 07:43 AM
Re: Is C programming neccesary to be UNIX Admin
C programming is absolutely not requiered. Reading it (even approximatively) really helps. C is extremly used in Unix World, and you will oftenly see C programs.
Shell scripting is IMHO necessary in a certain measure, because you must understand and modify scripts in your everyday life.
Perl is the perfect mix between shell and C. It can be *very* usefull to admins and can been learn really good with the Lama book and the Camel book (from O'reilly, and partially by Larry Wall himself).
Regards,
Fred
"Reality is just a point of view." (P. K. D.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2004 07:46 AM
05-13-2004 07:46 AM
Re: Is C programming neccesary to be UNIX Admin
Prior to being a UA I wrote a several million line C application using a couple dozen source files for a modem manufacturer as a test bed for the products.
I can write C no problem, writting shell script and PERL are so much easier I only go to C about once per year to keep in touch with it.
My current challenge is to learn Python. My first hurdle is to get it and the GUI running on my HP system.
Good luck
-Dave
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2004 09:28 AM
05-13-2004 09:28 AM
Re: Is C programming neccesary to be UNIX Admin
On the other hand, I use shell scripting, every day. I use the techniques even on the command line. For instance:
Say you have a volume group that has 30 logical volumes in it. You want to unmount the logical volumes and deactivate the volume group.
A SA that canâ t script, might umount the first logical volume, then recall the command, edit the line for the second logical volume, then execute the command. This SA would then repeat the process for all 30 logical volumes. This is a lot of typing, and takes quite a while.
A SA that is familiar with scripting could do the following all from the command line:
for lv in `bdf | grep vgXX | awk '{print $6}'
do
print ${lv}
umount ${lv}
done
Now, you might say what if some of the logical volumes are mounted to mount points that reside within other logical volumes of the same volume group, you would want to make sure that they get unmounted in the correct order. Well, with the above command line script, any LV that is â busyâ will not get unmounted. So, all you have to do is recall the previous command, and execute it again. If there is a file system that is busy because of another reason, then fix that problem and again recall the previous command and execute it.
As you can see, you donâ t even have to type a single mount point in order to get all of the LVâ s unmounted. This method can be accomplished in a matter of seconds. You can then issue the vgchange command.
I normally type something like the above command line script leaving out the umount command. After making sure that the result shows the correct logical volumes, I simply recall the command, press â vâ to edit the command line in vi (another necessity to be familiar with) and insert the umount command in the correct location.
Yes, a SA can do the job without using shell scripting, but that SA will not be
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2004 09:33 AM
05-13-2004 09:33 AM
Re: Is C programming neccesary to be UNIX Admin
for lv in `bdf | grep vgXX | awk '{print $6}'`
do
print ${lv}
umount ${lv}
done
Also the character represented by a " should be a double quotation mark. I didn't realize that it wouldn't show up correctly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2004 09:38 AM
05-13-2004 09:38 AM
Re: Is C programming neccesary to be UNIX Admin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2004 02:59 PM
05-13-2004 02:59 PM
Re: Is C programming neccesary to be UNIX Admin
Don't get me wrong, C is a GREAT language, however, you can do SO much in shell scripting. Shell scripting is SO much easier and forgiving. I believe that time would be better spent focusing on shell scripting or learning POSIX, PERL, etc.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2004 05:46 PM
05-13-2004 05:46 PM
Re: Is C programming neccesary to be UNIX Admin
But for anybody else, i'd say a good admin just knows Perl or Python (with Perl being the most popular).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2004 12:46 AM
05-14-2004 12:46 AM
Re: Is C programming neccesary to be UNIX Admin
I've been doing this for 15 yrs, and truthfully, it's much better skill development to had a good grasp of shell programming. the contructs you use in C are helpful but limit your scope. SED, AWK, BASH, SH, KSH, PERL, EXPECT do not require as much effort as C and can generally do anything that might be required. What may take 2 lines of code in a shell might take 20 in C. As an Admin I don't have time to fart with C when I need to get a job done I need it done so I can get on to other things. Programmers are notorious for sucking the budget dry. Leaving little room for hardware and new technologies.
Don't waste your companies money unless you are the developer. Let those code geeks handle it.
IMHO