SlideShare a Scribd company logo
1 of 3
Dusan Baljevic
dusan.baljevic@ieee.org

By default, HP-UX does not have any global tool to manage log file archiving and rotation. A
good, open-source option is to use logrotate.
a) Go to:
http://hpux.connect.org.uk/hppd/hpux/Sysadmin/logrotate-3.8.7/
Install it on HP-UX server (and all prerequisites).
b) Set up a cron job. For example:
# crontab -l
# Entry for monitoring status of the EMSHAProvider
5,20,35,50 * * * * /etc/opt/resmon/lbin/mon_EMSHAProvider_state.sh
5,20,35,50 * * * * /opt/sfm/bin/restart_sfm.sh
10,20,30,40,50 * * * * /usr/sbin/dmesg - >> /var/adm/messages # Entry for vacuuming the CERDB
5 1 * * * /opt/psb/vacuum
5,20,35,50 * * * * /opt/raidsaprovider/bin/restart_raidsaprovider.sh
5,20,35,50 * * * * /opt/sas/provider/bin/restart_sasprovider.sh
5,20,35,50 * * * * /opt/fcprovider/bin/restart_fcprovider.sh
5,20,35,50 * * * * /opt/dasprovider/bin/restart_dasprovider.sh
5,20,35,50 * * * * /opt/psb/bin/restart_logserv.sh
# logrotate
0 0 * * * /usr/local/sbin/logrotate /etc/logrotate.conf>/var/adm/syslog/logrotate.log 2>&1

c) Set up the /etc/logrotate.conf. For example:
# cat /etc/logrotate.conf
# sample logrotate configuration file
compress
/var/adm/syslog/syslog.log {
rotate 5
weekly
postrotate
/usr/bin/kill -HUP `cat /var/run/syslog.pid`
endscript
}
/var/adm/syslog/mail.log {
rotate 5
weekly
postrotate
/usr/bin/kill -HUP `cat /var/run/syslog.pid`
endscript
}
/var/adm/syslog/vseassist.log {
rotate 12
monthly
missingok
}
/var/adm/sw/swverify.log {
rotate 5
weekly
postrotate
/sbin/init.d/swagentd stop
/sbin/init.d/swagentd start
endscript
}
#/var/log/httpd/access.log {
# rotate 5
# mail root
# size 100k
# sharedscripts
# postrotate
#
/usr/bin/killall -HUP httpd
# endscript
#}
# no packages own wtmp -- we'll rotate them here /var/adm/wtmp {
monthly
create 0664 adm adm
rotate 12
}
/var/adm/wtmps {
monthly
create 0664 adm adm
rotate 12
}
/var/opt/wbem/*.log {
monthly
rotate 2
olddir /var/opt/wbem/prevmonth
missingok
postrotate
/sbin/init.d/cim_server stop
/sbin/init.d/cim_server start
endscript
nocompress
}
d) Check how it works:
# cat /var/run/logrotate.status
logrotate state -- version 2
"/var/adm/wtmp" 2013-3-16
"/var/adm/sw/swverify.log" 2013-3-16
"/var/adm/syslog/vseassist.log" 2011-3-16 "/var/opt/wbem/wbemassist.log" 2013-3-16
"/var/opt/wbem/install.log" 2011-3-16 "/var/adm/syslog/syslog.log" 2013-3-16 "/var/adm/wtmps"
2013-3-16 "/var/adm/syslog/mail.log" 2013-3-16

More Related Content

What's hot

【Zabbix2.0】snmpttによるトラップメッセージの編集 #Zabbix #自宅ラック勉強会
【Zabbix2.0】snmpttによるトラップメッセージの編集 #Zabbix #自宅ラック勉強会【Zabbix2.0】snmpttによるトラップメッセージの編集 #Zabbix #自宅ラック勉強会
【Zabbix2.0】snmpttによるトラップメッセージの編集 #Zabbix #自宅ラック勉強会
真乙 九龍
 

What's hot (20)

PHPの今とこれから2023
PHPの今とこれから2023PHPの今とこれから2023
PHPの今とこれから2023
 
Dev ops lpi-701
Dev ops lpi-701Dev ops lpi-701
Dev ops lpi-701
 
RHEL6 High Availability Add-On Technical Guide
RHEL6 High Availability Add-On Technical GuideRHEL6 High Availability Add-On Technical Guide
RHEL6 High Availability Add-On Technical Guide
 
VirtualBox と Rocky Linux 8 で始める Pacemaker ~ VirtualBox でも STONITH 機能が試せる! Vi...
VirtualBox と Rocky Linux 8 で始める Pacemaker  ~ VirtualBox でも STONITH 機能が試せる! Vi...VirtualBox と Rocky Linux 8 で始める Pacemaker  ~ VirtualBox でも STONITH 機能が試せる! Vi...
VirtualBox と Rocky Linux 8 で始める Pacemaker ~ VirtualBox でも STONITH 機能が試せる! Vi...
 
AHVでみるCVM Autopathの仕組み
AHVでみるCVM Autopathの仕組みAHVでみるCVM Autopathの仕組み
AHVでみるCVM Autopathの仕組み
 
RHEL7/CentOS7 NetworkManager徹底入門
RHEL7/CentOS7 NetworkManager徹底入門RHEL7/CentOS7 NetworkManager徹底入門
RHEL7/CentOS7 NetworkManager徹底入門
 
Implement server push in flask framework
Implement server push in flask frameworkImplement server push in flask framework
Implement server push in flask framework
 
【Zabbix2.0】snmpttによるトラップメッセージの編集 #Zabbix #自宅ラック勉強会
【Zabbix2.0】snmpttによるトラップメッセージの編集 #Zabbix #自宅ラック勉強会【Zabbix2.0】snmpttによるトラップメッセージの編集 #Zabbix #自宅ラック勉強会
【Zabbix2.0】snmpttによるトラップメッセージの編集 #Zabbix #自宅ラック勉強会
 
Lxc で始めるケチケチ仮想化生活?!
Lxc で始めるケチケチ仮想化生活?!Lxc で始めるケチケチ仮想化生活?!
Lxc で始めるケチケチ仮想化生活?!
 
SPAのルーティングの話
SPAのルーティングの話SPAのルーティングの話
SPAのルーティングの話
 
Support du cours : Systèmes d'exploitation 2 (linux)
Support du cours : Systèmes d'exploitation 2 (linux)Support du cours : Systèmes d'exploitation 2 (linux)
Support du cours : Systèmes d'exploitation 2 (linux)
 
Nmapの真実(続)
Nmapの真実(続)Nmapの真実(続)
Nmapの真実(続)
 
IT Pro のための PowerShell スクリプティング
IT Pro のための PowerShell スクリプティングIT Pro のための PowerShell スクリプティング
IT Pro のための PowerShell スクリプティング
 
Haxeについて
HaxeについてHaxeについて
Haxeについて
 
Git入門
Git入門Git入門
Git入門
 
OpenStackをさらに”使う”技術 概要と基礎操作
OpenStackをさらに”使う”技術 概要と基礎操作OpenStackをさらに”使う”技術 概要と基礎操作
OpenStackをさらに”使う”技術 概要と基礎操作
 
alphorm.com - Formation proxmoxVE 3
alphorm.com - Formation proxmoxVE 3alphorm.com - Formation proxmoxVE 3
alphorm.com - Formation proxmoxVE 3
 
Meet hbase 2.0
Meet hbase 2.0Meet hbase 2.0
Meet hbase 2.0
 
One-Liners to Rule Them All
One-Liners to Rule Them AllOne-Liners to Rule Them All
One-Liners to Rule Them All
 
系統安全稽核即刻上手 [2019/08/24] @Monospace
系統安全稽核即刻上手 [2019/08/24] @Monospace系統安全稽核即刻上手 [2019/08/24] @Monospace
系統安全稽核即刻上手 [2019/08/24] @Monospace
 

Viewers also liked

HP Superdome 2 Partitioning Administrator Guide HP-UX 11iv3(August 2010).PDF
HP Superdome 2 Partitioning Administrator Guide HP-UX 11iv3(August 2010).PDFHP Superdome 2 Partitioning Administrator Guide HP-UX 11iv3(August 2010).PDF
HP Superdome 2 Partitioning Administrator Guide HP-UX 11iv3(August 2010).PDF
E. Balauca
 

Viewers also liked (20)

HP-UX RBAC Audsys Setup by Dusan Baljevic
HP-UX RBAC Audsys Setup by Dusan BaljevicHP-UX RBAC Audsys Setup by Dusan Baljevic
HP-UX RBAC Audsys Setup by Dusan Baljevic
 
Superdome
SuperdomeSuperdome
Superdome
 
HP-UX 11iv3 How to Change Root Volume Group Name vg00 by Dusan Baljevic
HP-UX 11iv3 How to Change Root Volume Group Name vg00 by Dusan BaljevicHP-UX 11iv3 How to Change Root Volume Group Name vg00 by Dusan Baljevic
HP-UX 11iv3 How to Change Root Volume Group Name vg00 by Dusan Baljevic
 
Hp ux-11iv3-multiple-clones-with-dynamic-root-disks-dusan-baljevic-mar2014
Hp ux-11iv3-multiple-clones-with-dynamic-root-disks-dusan-baljevic-mar2014Hp ux-11iv3-multiple-clones-with-dynamic-root-disks-dusan-baljevic-mar2014
Hp ux-11iv3-multiple-clones-with-dynamic-root-disks-dusan-baljevic-mar2014
 
Three CLI Methods to Find Console IP details on HP-UX by Dusan Baljevic
Three CLI Methods to Find Console IP details on HP-UX by Dusan BaljevicThree CLI Methods to Find Console IP details on HP-UX by Dusan Baljevic
Three CLI Methods to Find Console IP details on HP-UX by Dusan Baljevic
 
Better Settings for /tmp Filesystem on HP-UX by Dusan Baljevic
Better Settings for /tmp Filesystem on HP-UX by Dusan BaljevicBetter Settings for /tmp Filesystem on HP-UX by Dusan Baljevic
Better Settings for /tmp Filesystem on HP-UX by Dusan Baljevic
 
Hp Integrity Servers
Hp Integrity ServersHp Integrity Servers
Hp Integrity Servers
 
HP-UX 11i LVM Mirroring Features and Multi-threads by Dusan Baljevic
HP-UX 11i LVM Mirroring Features and Multi-threads by Dusan BaljevicHP-UX 11i LVM Mirroring Features and Multi-threads by Dusan Baljevic
HP-UX 11i LVM Mirroring Features and Multi-threads by Dusan Baljevic
 
HP-UX with Rsync by Dusan Baljevic
HP-UX with Rsync by Dusan BaljevicHP-UX with Rsync by Dusan Baljevic
HP-UX with Rsync by Dusan Baljevic
 
How to Remove Primary Swap on HP-UX 11iv3 Online by Dusan Baljevic
How to Remove Primary Swap on HP-UX 11iv3 Online by Dusan BaljevicHow to Remove Primary Swap on HP-UX 11iv3 Online by Dusan Baljevic
How to Remove Primary Swap on HP-UX 11iv3 Online by Dusan Baljevic
 
HP-UX Swap and Dump Unleashed by Dusan Baljevic
HP-UX Swap and Dump Unleashed by Dusan BaljevicHP-UX Swap and Dump Unleashed by Dusan Baljevic
HP-UX Swap and Dump Unleashed by Dusan Baljevic
 
HPUX Update Seminar Session 1 Dan Taipala
HPUX Update Seminar Session 1   Dan TaipalaHPUX Update Seminar Session 1   Dan Taipala
HPUX Update Seminar Session 1 Dan Taipala
 
UX at HP Enterprise
UX at HP Enterprise UX at HP Enterprise
UX at HP Enterprise
 
HP-UX 11iv3 Ignite-UX with NFSv4 and SSH Tunnel by Dusan Baljevic
HP-UX 11iv3 Ignite-UX with NFSv4 and SSH Tunnel by Dusan BaljevicHP-UX 11iv3 Ignite-UX with NFSv4 and SSH Tunnel by Dusan Baljevic
HP-UX 11iv3 Ignite-UX with NFSv4 and SSH Tunnel by Dusan Baljevic
 
Provissioning storage
Provissioning storageProvissioning storage
Provissioning storage
 
HP-UX - Patch Installation
HP-UX  - Patch InstallationHP-UX  - Patch Installation
HP-UX - Patch Installation
 
HP-UX Dynamic Root Disk Boot Disk Cloning Benefits and Use Cases by Dusan Bal...
HP-UX Dynamic Root Disk Boot Disk Cloning Benefits and Use Cases by Dusan Bal...HP-UX Dynamic Root Disk Boot Disk Cloning Benefits and Use Cases by Dusan Bal...
HP-UX Dynamic Root Disk Boot Disk Cloning Benefits and Use Cases by Dusan Bal...
 
Unix Administration 1
Unix Administration 1Unix Administration 1
Unix Administration 1
 
HP Unix administration
HP Unix administrationHP Unix administration
HP Unix administration
 
HP Superdome 2 Partitioning Administrator Guide HP-UX 11iv3(August 2010).PDF
HP Superdome 2 Partitioning Administrator Guide HP-UX 11iv3(August 2010).PDFHP Superdome 2 Partitioning Administrator Guide HP-UX 11iv3(August 2010).PDF
HP Superdome 2 Partitioning Administrator Guide HP-UX 11iv3(August 2010).PDF
 

Similar to HP-UX 11i Log File Management with Logrotate by Dusan Baljevic

Power point on linux commands,appache,php,mysql,html,css,web 2.0
Power point on linux commands,appache,php,mysql,html,css,web 2.0Power point on linux commands,appache,php,mysql,html,css,web 2.0
Power point on linux commands,appache,php,mysql,html,css,web 2.0
venkatakrishnan k
 
Common linuxcommandspocketguide07
Common linuxcommandspocketguide07Common linuxcommandspocketguide07
Common linuxcommandspocketguide07
Teja Bheemanapally
 
Common linuxcommandspocketguide07
Common linuxcommandspocketguide07Common linuxcommandspocketguide07
Common linuxcommandspocketguide07
Teja Bheemanapally
 
Steps to build and run oai
Steps to build and run oaiSteps to build and run oai
Steps to build and run oai
ssuser38b887
 

Similar to HP-UX 11i Log File Management with Logrotate by Dusan Baljevic (20)

PHP selber bauen
PHP selber bauenPHP selber bauen
PHP selber bauen
 
Advanced Level Training on Koha / TLS (ToT)
Advanced Level Training on Koha / TLS (ToT)Advanced Level Training on Koha / TLS (ToT)
Advanced Level Training on Koha / TLS (ToT)
 
3.1.c apend scripting, crond, atd
3.1.c apend   scripting, crond, atd3.1.c apend   scripting, crond, atd
3.1.c apend scripting, crond, atd
 
101 apend. scripting, crond, atd
101 apend. scripting, crond, atd101 apend. scripting, crond, atd
101 apend. scripting, crond, atd
 
Linux Common Command
Linux Common CommandLinux Common Command
Linux Common Command
 
Dev ops
Dev opsDev ops
Dev ops
 
Upgrade ux-fosdem-2015-gdhaese
Upgrade ux-fosdem-2015-gdhaeseUpgrade ux-fosdem-2015-gdhaese
Upgrade ux-fosdem-2015-gdhaese
 
Linux filesystemhierarchy
Linux filesystemhierarchyLinux filesystemhierarchy
Linux filesystemhierarchy
 
The origin: Init (compact version)
The origin: Init (compact version)The origin: Init (compact version)
The origin: Init (compact version)
 
Solaris_quickref.pdf
Solaris_quickref.pdfSolaris_quickref.pdf
Solaris_quickref.pdf
 
Linux Containers From Scratch
Linux Containers From ScratchLinux Containers From Scratch
Linux Containers From Scratch
 
Where's the source, Luke? : How to find and debug the code behind Plone
Where's the source, Luke? : How to find and debug the code behind PloneWhere's the source, Luke? : How to find and debug the code behind Plone
Where's the source, Luke? : How to find and debug the code behind Plone
 
Koha installation BALID
Koha installation BALIDKoha installation BALID
Koha installation BALID
 
Power point on linux commands,appache,php,mysql,html,css,web 2.0
Power point on linux commands,appache,php,mysql,html,css,web 2.0Power point on linux commands,appache,php,mysql,html,css,web 2.0
Power point on linux commands,appache,php,mysql,html,css,web 2.0
 
Linux presentation
Linux presentationLinux presentation
Linux presentation
 
Ibm bpm problem determination
Ibm bpm problem determinationIbm bpm problem determination
Ibm bpm problem determination
 
Common linuxcommandspocketguide07
Common linuxcommandspocketguide07Common linuxcommandspocketguide07
Common linuxcommandspocketguide07
 
Common linuxcommandspocketguide07
Common linuxcommandspocketguide07Common linuxcommandspocketguide07
Common linuxcommandspocketguide07
 
Sling Applications - A DevOps perspective
Sling Applications - A DevOps perspectiveSling Applications - A DevOps perspective
Sling Applications - A DevOps perspective
 
Steps to build and run oai
Steps to build and run oaiSteps to build and run oai
Steps to build and run oai
 

More from Circling Cycle

More from Circling Cycle (7)

Brief summary-standard-password-hashes-Aix-FreeBSD-Linux-Solaris-HP-UX-May-20...
Brief summary-standard-password-hashes-Aix-FreeBSD-Linux-Solaris-HP-UX-May-20...Brief summary-standard-password-hashes-Aix-FreeBSD-Linux-Solaris-HP-UX-May-20...
Brief summary-standard-password-hashes-Aix-FreeBSD-Linux-Solaris-HP-UX-May-20...
 
How to-mount-3 par-san-virtual-copy-onto-rhel-servers-by-Dusan-Baljevic
How to-mount-3 par-san-virtual-copy-onto-rhel-servers-by-Dusan-BaljevicHow to-mount-3 par-san-virtual-copy-onto-rhel-servers-by-Dusan-Baljevic
How to-mount-3 par-san-virtual-copy-onto-rhel-servers-by-Dusan-Baljevic
 
Ovclusterinfo command by Dusan Baljevic
Ovclusterinfo command by Dusan BaljevicOvclusterinfo command by Dusan Baljevic
Ovclusterinfo command by Dusan Baljevic
 
Unix and Linux Common Boot Disk Disaster Recovery Tools by Dusan Baljevic
Unix and Linux Common Boot Disk Disaster Recovery Tools by Dusan BaljevicUnix and Linux Common Boot Disk Disaster Recovery Tools by Dusan Baljevic
Unix and Linux Common Boot Disk Disaster Recovery Tools by Dusan Baljevic
 
HP-UX 11iv3 Private Kernel Parameter nfile by Dusan Baljevic
HP-UX 11iv3 Private Kernel Parameter nfile by Dusan BaljevicHP-UX 11iv3 Private Kernel Parameter nfile by Dusan Baljevic
HP-UX 11iv3 Private Kernel Parameter nfile by Dusan Baljevic
 
HP-UX Dynamic Root Disk vs Solaris Live Upgrade vs AIX Multibos by Dusan Balj...
HP-UX Dynamic Root Disk vs Solaris Live Upgrade vs AIX Multibos by Dusan Balj...HP-UX Dynamic Root Disk vs Solaris Live Upgrade vs AIX Multibos by Dusan Balj...
HP-UX Dynamic Root Disk vs Solaris Live Upgrade vs AIX Multibos by Dusan Balj...
 
Comparison of Unix and Linux Log File Management Tools by Dusan Baljevic
Comparison of Unix and Linux Log File Management Tools by Dusan BaljevicComparison of Unix and Linux Log File Management Tools by Dusan Baljevic
Comparison of Unix and Linux Log File Management Tools by Dusan Baljevic
 

Recently uploaded

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Recently uploaded (20)

2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 

HP-UX 11i Log File Management with Logrotate by Dusan Baljevic

  • 1. Dusan Baljevic dusan.baljevic@ieee.org By default, HP-UX does not have any global tool to manage log file archiving and rotation. A good, open-source option is to use logrotate. a) Go to: http://hpux.connect.org.uk/hppd/hpux/Sysadmin/logrotate-3.8.7/ Install it on HP-UX server (and all prerequisites). b) Set up a cron job. For example: # crontab -l # Entry for monitoring status of the EMSHAProvider 5,20,35,50 * * * * /etc/opt/resmon/lbin/mon_EMSHAProvider_state.sh 5,20,35,50 * * * * /opt/sfm/bin/restart_sfm.sh 10,20,30,40,50 * * * * /usr/sbin/dmesg - >> /var/adm/messages # Entry for vacuuming the CERDB 5 1 * * * /opt/psb/vacuum 5,20,35,50 * * * * /opt/raidsaprovider/bin/restart_raidsaprovider.sh 5,20,35,50 * * * * /opt/sas/provider/bin/restart_sasprovider.sh 5,20,35,50 * * * * /opt/fcprovider/bin/restart_fcprovider.sh 5,20,35,50 * * * * /opt/dasprovider/bin/restart_dasprovider.sh 5,20,35,50 * * * * /opt/psb/bin/restart_logserv.sh # logrotate 0 0 * * * /usr/local/sbin/logrotate /etc/logrotate.conf>/var/adm/syslog/logrotate.log 2>&1 c) Set up the /etc/logrotate.conf. For example: # cat /etc/logrotate.conf # sample logrotate configuration file compress /var/adm/syslog/syslog.log { rotate 5 weekly postrotate /usr/bin/kill -HUP `cat /var/run/syslog.pid` endscript } /var/adm/syslog/mail.log { rotate 5 weekly postrotate /usr/bin/kill -HUP `cat /var/run/syslog.pid` endscript }
  • 2. /var/adm/syslog/vseassist.log { rotate 12 monthly missingok } /var/adm/sw/swverify.log { rotate 5 weekly postrotate /sbin/init.d/swagentd stop /sbin/init.d/swagentd start endscript } #/var/log/httpd/access.log { # rotate 5 # mail root # size 100k # sharedscripts # postrotate # /usr/bin/killall -HUP httpd # endscript #} # no packages own wtmp -- we'll rotate them here /var/adm/wtmp { monthly create 0664 adm adm rotate 12 } /var/adm/wtmps { monthly create 0664 adm adm rotate 12 } /var/opt/wbem/*.log { monthly rotate 2 olddir /var/opt/wbem/prevmonth missingok postrotate /sbin/init.d/cim_server stop /sbin/init.d/cim_server start endscript nocompress }
  • 3. d) Check how it works: # cat /var/run/logrotate.status logrotate state -- version 2 "/var/adm/wtmp" 2013-3-16 "/var/adm/sw/swverify.log" 2013-3-16 "/var/adm/syslog/vseassist.log" 2011-3-16 "/var/opt/wbem/wbemassist.log" 2013-3-16 "/var/opt/wbem/install.log" 2011-3-16 "/var/adm/syslog/syslog.log" 2013-3-16 "/var/adm/wtmps" 2013-3-16 "/var/adm/syslog/mail.log" 2013-3-16