Operating System - HP-UX
1834745 Members
2789 Online
110070 Solutions
New Discussion

df -kP truncates the filesystem name

 
SOLVED
Go to solution
Francis Noël
Regular Advisor

df -kP truncates the filesystem name

Hi gang

I have an issue where automated management tools get non-standard output from the "df" command.

"df -kP" will truncate long filesystem names as it insists on putting the filesytem name on the same output line as its stats. The filesystem name is truncated upon reaching the "1024-blocks" column.

Funny thing is that on another host "df -kP" will graciously put the filesystem name on its own line and push the stats down one line. I believe this is the expected standard behavior for df.

On both hosts "uname -a", "which df" and "what /usr/bin/df" return the same output. Since the binary and patches are the same and one of them behaves, what could be causing df to truncate long filesystem names ?

Thank you for your time.
6 REPLIES 6
Sundar_7
Honored Contributor

Re: df -kP truncates the filesystem name

hmm interesting..may be do a tusc on both the systems and compare the output ?
Learn What to do ,How to do and more importantly When to do ?
Francis Noël
Regular Advisor

Re: df -kP truncates the filesystem name

Thank your for your reply Sundar.

While playing around with tusc ( didnt have it installed ) as a standard user I noticed that the output from " df -kP " was normal.

Seems something set in root's .profile is causing this. I confirmed by removing root's .profile and logging back in, "df -kP" operated correctly. Putting the .profile back in brought back the weirdness.

The workday is over and I have every confidence I will isolate what is wrong in the .profile tomorrow. I'll post my findings in ~10 hours.

Thanks again
-F
Geoff Wild
Honored Contributor
Solution

Re: df -kP truncates the filesystem name

Maybe the environment is different?

Does bdf return the same on both systems?

What about the attached script - called bdfmegs?

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Francis Noël
Regular Advisor

Re: df -kP truncates the filesystem name

Seems you are right Geoff.


We'll find out tomorrow.

Posts are 2 seconds apart :)
James R. Ferguson
Acclaimed Contributor

Re: df -kP truncates the filesystem name

Hi Francis:

Check your ${TERM} value on both servers. The mis-behaving server may be mis-set. Try running:

# stty sane

Regards!

...JRF...
Francis Noël
Regular Advisor

Re: df -kP truncates the filesystem name

Thank you all for your help.

UNIX95=TRUE was set in root's .profile. I removed the value and df now behaves.

Seems this was not needed anyway.

Thanks again.