HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: bug in dodisk
Operating System - HP-UX
1832777
Members
3200
Online
110045
Solutions
Forums
Categories
Company
Local Language
back
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
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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
04-15-2004 05:56 AM
04-15-2004 05:56 AM
bug in dodisk
I noticed a bug in the script /usr/sbin/acct/dodisk.
If you get a message like :
"Syntax error at line 1 : `(' is not expected"
the error comes from the line :
"# See fstab(4) and sam(1M) for further details on configuring devices."
in /etc/fstab which is not treated well by the awk script in dodisk. (cf. note 1)
You can modify the dodisk script :
replace "if (access(diskusg))" [line 64 on HP 11.11]
by "if (access(diskusg)==1)"
But there is another BIGGER BUG. This script shouldn't look for commented lines but it does it. And, as a result, if you comment out a line in the middle of /etc/fstab, you can't get the diskusage for file systems under this line (cf. note 2).
So, instead of the correction above, it is better to do this one :
After the line
"\$3 !~ /swap/ \" [line 51 on HP 11.11]
you can add :
"&& \$1 !~ /^#/ \"
It can help before HP correct it.
Will HP be inform on the bug through this forum, or should I use another procedure ?
HTH
Marc.
If you get a message like :
"Syntax error at line 1 : `(' is not expected"
the error comes from the line :
"# See fstab(4) and sam(1M) for further details on configuring devices."
in /etc/fstab which is not treated well by the awk script in dodisk. (cf. note 1)
You can modify the dodisk script :
replace "if (access(diskusg))" [line 64 on HP 11.11]
by "if (access(diskusg)==1)"
But there is another BIGGER BUG. This script shouldn't look for commented lines but it does it. And, as a result, if you comment out a line in the middle of /etc/fstab, you can't get the diskusage for file systems under this line (cf. note 2).
So, instead of the correction above, it is better to do this one :
After the line
"\$3 !~ /swap/ \" [line 51 on HP 11.11]
you can add :
"&& \$1 !~ /^#/ \"
It can help before HP correct it.
Will HP be inform on the bug through this forum, or should I use another procedure ?
HTH
Marc.
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2004 06:00 AM
04-15-2004 06:00 AM
Re: bug in dodisk
Note 1 :
The line :
"# See fstab(4) and sam(1M) for further details on configuring devices."
leads the awk script to test if the command :
"/usr/lbin/fs/fstab(4)/diskusg"
exists, which is not true of course. And it should return a 0 code. But, because of the '(', it returns code 2, which is non null, so the test is OK.
And the script tries to execute it !!!
CQFD
The line :
"# See fstab(4) and sam(1M) for further details on configuring devices."
leads the awk script to test if the command :
"/usr/lbin/fs/fstab(4)/diskusg"
exists, which is not true of course. And it should return a 0 code. But, because of the '(', it returns code 2, which is non null, so the test is OK.
And the script tries to execute it !!!
CQFD
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2004 06:07 AM
04-15-2004 06:07 AM
Re: bug in dodisk
Note 2 :
If your /etc/fstab looks like :
/dev/vg00/lvol4 /opt vxfs delaylog 0 2
/dev/vg00/lvol5 /tmp vxfs delaylog 0 2
#/dev/vg00/lvol6 /usr vxfs delaylog 0 2
/dev/vg00/lvol7 /var vxfs delaylog 0 2
[it is an exemple, it is not realistic]
So the awk script will try to execute :
/usr/lbin/fs/vxfs/diskusg /dev/vg00/lvol4 /dev/vg00/lvol5 #/dev/vg00/lvol6 /dev/vg00/lvol7
And because of the '#', the end of the line won't be concerned, though it should.
And you'll get disk usage of two file systems instead of three available !!!
CQFD
If your /etc/fstab looks like :
/dev/vg00/lvol4 /opt vxfs delaylog 0 2
/dev/vg00/lvol5 /tmp vxfs delaylog 0 2
#/dev/vg00/lvol6 /usr vxfs delaylog 0 2
/dev/vg00/lvol7 /var vxfs delaylog 0 2
[it is an exemple, it is not realistic]
So the awk script will try to execute :
/usr/lbin/fs/vxfs/diskusg /dev/vg00/lvol4 /dev/vg00/lvol5 #/dev/vg00/lvol6 /dev/vg00/lvol7
And because of the '#', the end of the line won't be concerned, though it should.
And you'll get disk usage of two file systems instead of three available !!!
CQFD
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP