to check the Linux upgrade in the host


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting to check the Linux upgrade in the host
# 1  
Old 03-01-2010
to check the Linux upgrade in the host

Hi,

how to check when was the linux upgrade has been done to this host.

below command show the RHEL version.
cat /etc/redhat-release
Red Hat Enterprise Linux AS release 3 (Taroon Update 6)


i want to know when it was upgraded..
is there any command available for that ? or anywhere we can check ?

Thanks
# 2  
Old 03-02-2010
Code:
cat /proc/version

or

Code:
uname -a

# 3  
Old 03-02-2010
its not showing the date when linux upgraded..

in my machine i upgraded Red hat linux server release 5.3 on 26 feb 2010
in anywhere i am unable to see that the new version upgraded on 26th feb.
before that i was running linux 3.
# 4  
Old 03-02-2010
Hi.

I use CentOS 5.4, the free version of RedHat. I looked in /var/log, and found some logs for "yum". Here is a script that shows a sample of when some updates were made:
Code:
#!/usr/bin/env bash

# @(#) s1	Demonstrate time of update.

echo
echo "(Versions displayed with local utility \"version\")"
version >/dev/null 2>&1 && version =o $(_eat $0 $1) 
set -o nounset
echo


ls -l /var/log/yum*

echo
head -3 /var/log/yum.log

exit 0

producing:
Code:
$ ./s1

(Versions displayed with local utility "version")
OS, ker|rel, machine: Linux, 2.6.18-164.11.1.el5, i686
Distribution        : CentOS release 5.4 (Final)
GNU bash 3.2.25

-rw-r--r-- 1 root root  3308 Feb  5 12:00 /var/log/yum.log
-rw-r--r-- 1 root root 43464 Dec 23 18:33 /var/log/yum.log.1
-rw-r--r-- 1 root root 38360 Jan  2  2009 /var/log/yum.log.2

Feb 05 11:50:24 Updated: selinux-policy-2.4.6-255.el5_4.4.noarch
Feb 05 11:50:31 Updated: kernel-headers-2.6.18-164.11.1.el5.i386
Feb 05 11:50:50 Updated: tzdata-2009u-1.el5.noarch

I have no idea if this is always the case for an update. The files may contain more than one set of updates, so you may need to process to collect the unique dates.

Best wishes ... cheers, drl
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

SFTP file check through a remote host

Hi all, posting my first time, hope not breaking posting rules with it, if yes, let me know. I'm trying to build a script to check a file in an sftp server through a remote server. The intention is to check the file in a sftp host, and if the file is found or not, it should send an email.... (4 Replies)
Discussion started by: MrShinyPants
4 Replies

2. Solaris

Solaris live upgrade - how to check if a fs is shared or not

Hi all, 1) how do i check which FS(filesystems) in the current active PBE are shared and not shared with the ABE (alternate boot env) ? is doing lufslist and comparing between the 2 BEs the only option ? 2) when doing a luactivate -s (synchronize), does the synchronization go both way... (0 Replies)
Discussion started by: javanoob
0 Replies

3. SCO

Upgrade SCO 5.0.2 Host to Enterprise with license

Hello, I have an old system SCO 5.0.2 HOST (without network) and some applications on this machine. Theses applications are not installable again on other system because i have not the routines. And it's now necessary to connect this old system on local network for a "new" application. I have SCO... (13 Replies)
Discussion started by: Lm76
13 Replies

4. UNIX for Dummies Questions & Answers

Check port 2222 is open on a remote host

I am able to connect to a remote host using the legacy IP and port 2222. Today the remote has a new IP I am unable to connect. How to check if the remote host is blocking or if its my server is unable to connect. Err Msg : telnet: Unable to connect to remote host: Connection refused Err... (5 Replies)
Discussion started by: ITDev01
5 Replies

5. Shell Programming and Scripting

Script to check if host key authentication is setup

Hey all, I have a script that I use for some automated installs. Unfortunately for the script to work the server that it's running from needs to have host-key authentication setup to the target server. If it isn't setup beforehand and the script is executed the install partially completes and... (1 Reply)
Discussion started by: Rike255
1 Replies

6. Red Hat

Linux - update/upgrade

Hi, I'm interesting do you have a some solution/good practice how upgrade/update OS with possibility to back previously release (something like Live upgrade in Solaris) ? thanks. (2 Replies)
Discussion started by: deivo
2 Replies

7. Shell Programming and Scripting

command to check whether the remote host is up or not

Hi, My script needs to check whether the remote host is up or not. If it is up i need to start few servers in that host or else just a notification should be sent that the remote host is down? Could someone help me out in this? Regards Arun (4 Replies)
Discussion started by: arunkumarmc
4 Replies

8. Shell Programming and Scripting

check ssh connection to remote host

I am using KSH and I need to check whether the remote host has been configured with ssh public key. Is there any way we can check inside a script? (6 Replies)
Discussion started by: praveenbvarrier
6 Replies

9. UNIX for Dummies Questions & Answers

Bash Script to check Remote Host Connection

Hi all, Can anyone tell/guide me how to check remote host is up/running using bash script? Thanks. Zulfiqar (5 Replies)
Discussion started by: zulfikarmd
5 Replies

10. Shell Programming and Scripting

Check host file for duplicate entries

I need a KSH script that will check a host file for duplicate IP's and/or host names and report out the errors. Anyone out there have one they would like to share? Something like: Hostname blahblah appears X times IP Address xxx.xxx.xxx.xxx appears X times TIA (4 Replies)
Discussion started by: ThreeDot
4 Replies
Login or Register to Ask a Question