<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: how do HP-UX create temporary files in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/how-do-hp-ux-create-temporary-files/m-p/2627078#M40195</link>
    <description>TMPDIR generally works on HP (if the application developer (Oracle) honors the TMPDIR environment variable -- they're copping out on you if they push you over to HP - they should know how their code works).  &lt;BR /&gt;&lt;BR /&gt;Here's a snip of man tmpnam:&lt;BR /&gt;&lt;BR /&gt;tempnam()      allows the user to control the choice of a&lt;BR /&gt;                          directory.  The argument dir points to the name of&lt;BR /&gt;                          the directory in which the file is to be created.&lt;BR /&gt;                          If dir is NULL or points to a string that is not&lt;BR /&gt;                          an appropriate directory name, the path-prefix&lt;BR /&gt;                          defined as P_tmpdir in the &lt;STDIO.H&gt; header file&lt;BR /&gt;                          is used.  If that directory is not accessible,&lt;BR /&gt;                          /tmp is used as a last resort.  This entire&lt;BR /&gt;                          sequence can be up-staged by providing an&lt;BR /&gt;                          environment variable TMPDIR in the user's&lt;BR /&gt;                          environment, whose value is the name of the&lt;BR /&gt;                          desired temporary-file directory.&lt;BR /&gt;&lt;BR /&gt;tmpfile(3) and mktemp(3) are also available.&lt;BR /&gt;&lt;BR /&gt;BTW, check the perms of /var/tmp - we make the perms on tmp directories 1777 instead of 777; which means that you have to own the file to remove it from tmp.  These perms break some setuid programs like sendmail hooked to procmail.&lt;BR /&gt;&lt;BR /&gt;&lt;/STDIO.H&gt;</description>
    <pubDate>Thu, 06 Dec 2001 20:07:34 GMT</pubDate>
    <dc:creator>Christopher Caldwell</dc:creator>
    <dc:date>2001-12-06T20:07:34Z</dc:date>
    <item>
      <title>how do HP-UX create temporary files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-do-hp-ux-create-temporary-files/m-p/2627070#M40187</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Recently, my /var/tmp has reached 100% space usage due to some files created by oracle shadow process. My server run on HP-UX 11.00 64 bit. I have been wondering how do HP-UX create a temporary file, does it use tempnam() or tmpnam(). It seems that even if I change my TMPDIR to different location, the temporary files were still being created in /var/tmp. Look likes it use tmpnam() to create temporary files because tmpnam() will always create file in /var/tmp no matter what is the value of TMPDIR.&lt;BR /&gt;&lt;BR /&gt;Anyone has any information regarding this issue.&lt;BR /&gt;&lt;BR /&gt;Thanks in advance.</description>
      <pubDate>Thu, 06 Dec 2001 18:57:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-do-hp-ux-create-temporary-files/m-p/2627070#M40187</guid>
      <dc:creator>Ridzuan Zakaria</dc:creator>
      <dc:date>2001-12-06T18:57:31Z</dc:date>
    </item>
    <item>
      <title>Re: how do HP-UX create temporary files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-do-hp-ux-create-temporary-files/m-p/2627071#M40188</link>
      <description>temp file creation is application specific (vi, Oracle, xx are all subject to doing it differently).  Some times it's done insecurely - see the tmp file creation/predictable file name vulnerability of the man command.    &lt;BR /&gt;&lt;BR /&gt;Use lsof to see what's making files in /var/tmp - if Oracle is the hog, log a tar with Oracle to get them to help you figure out what's happening.</description>
      <pubDate>Thu, 06 Dec 2001 19:43:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-do-hp-ux-create-temporary-files/m-p/2627071#M40188</guid>
      <dc:creator>Christopher Caldwell</dc:creator>
      <dc:date>2001-12-06T19:43:22Z</dc:date>
    </item>
    <item>
      <title>Re: how do HP-UX create temporary files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-do-hp-ux-create-temporary-files/m-p/2627072#M40189</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;Only some utilities use the environmental variable TMPDIR to select the directory for temporary files.  'sort' (using the '-t') option is one of them).&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Thu, 06 Dec 2001 19:43:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-do-hp-ux-create-temporary-files/m-p/2627072#M40189</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2001-12-06T19:43:23Z</dc:date>
    </item>
    <item>
      <title>Re: how do HP-UX create temporary files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-do-hp-ux-create-temporary-files/m-p/2627073#M40190</link>
      <description>Hi Ridzuan,&lt;BR /&gt;&lt;BR /&gt;You need to set and export the variable TMPDIR, so that it points to the directory you want it to use.&lt;BR /&gt;&lt;BR /&gt;Hope this helps.&lt;BR /&gt;&lt;BR /&gt;Regds&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 06 Dec 2001 19:45:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-do-hp-ux-create-temporary-files/m-p/2627073#M40190</guid>
      <dc:creator>Sanjay_6</dc:creator>
      <dc:date>2001-12-06T19:45:19Z</dc:date>
    </item>
    <item>
      <title>Re: how do HP-UX create temporary files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-do-hp-ux-create-temporary-files/m-p/2627074#M40191</link>
      <description>Hi Ridzuan,&lt;BR /&gt;&lt;BR /&gt;you may also want to take a look at this thread,&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://us-support2.external.hp.com/cki/bin/doc.pl/sid=a8c720af052550bab9/screen=ckiDisplayDocument?docId=200000012779122" target="_blank"&gt;http://us-support2.external.hp.com/cki/bin/doc.pl/sid=a8c720af052550bab9/screen=ckiDisplayDocument?docId=200000012779122&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Hope this helps.&lt;BR /&gt;&lt;BR /&gt;Regds&lt;BR /&gt;</description>
      <pubDate>Thu, 06 Dec 2001 19:46:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-do-hp-ux-create-temporary-files/m-p/2627074#M40191</guid>
      <dc:creator>Sanjay_6</dc:creator>
      <dc:date>2001-12-06T19:46:49Z</dc:date>
    </item>
    <item>
      <title>Re: how do HP-UX create temporary files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-do-hp-ux-create-temporary-files/m-p/2627075#M40192</link>
      <description>Hi Ridzuan,&lt;BR /&gt;&lt;BR /&gt;HP-UX OS doesn't create temp files on it's own but the utilities/softwares do. For ex., if we edit a file, the copy will be placed under /var/tmp/ as Ex$$ ($$ being the pid). So if someone edits a 50MB file /var will be increased by 50MB due to this copy. If the vi is abnormally shut (like closing the telnet window), this will remain and occupy the space.&lt;BR /&gt;So, it is a good practice to remove the files that are 3-4 days older from these temp directories.&lt;BR /&gt;&lt;BR /&gt;Another way is by people like me who create temp files in their scripts/programs but do not clean up before exiting them. So, they also will remain.&lt;BR /&gt;&lt;BR /&gt;-Sri&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 06 Dec 2001 19:50:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-do-hp-ux-create-temporary-files/m-p/2627075#M40192</guid>
      <dc:creator>Sridhar Bhaskarla</dc:creator>
      <dc:date>2001-12-06T19:50:50Z</dc:date>
    </item>
    <item>
      <title>Re: how do HP-UX create temporary files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-do-hp-ux-create-temporary-files/m-p/2627076#M40193</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;It varies. If the programmers have been beaten over the head and told to honor the TMPDIR convention then you should be fine. The tempnam() and tmpnam() functions do honor this. Also, bear in mind that TMPDIR must be set before the process is started or it will have no effect.&lt;BR /&gt;&lt;BR /&gt;When the programmers are really sneaky they'll do this to you:&lt;BR /&gt;&lt;BR /&gt;fname = tmpnam(char *) NULL);&lt;BR /&gt;fdes = open(fname,O_RDWR | O_CREAT,0600);&lt;BR /&gt;unlink(fname);&lt;BR /&gt;...&lt;BR /&gt;...&lt;BR /&gt;...&lt;BR /&gt;close(fdes);&lt;BR /&gt;&lt;BR /&gt;In this case, even though the file has been unlinked and thus you won't see it, as long as the process has it open, the space is used. This is a pretty standard technique and in fact the tmpfile() function does this.&lt;BR /&gt;&lt;BR /&gt;Clay</description>
      <pubDate>Thu, 06 Dec 2001 19:57:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-do-hp-ux-create-temporary-files/m-p/2627076#M40193</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2001-12-06T19:57:24Z</dc:date>
    </item>
    <item>
      <title>Re: how do HP-UX create temporary files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-do-hp-ux-create-temporary-files/m-p/2627077#M40194</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Chris, I have opened a TAR with Oracle regarding this issue and Oracle's feedback is indicate that this is O/S related problem (dependency) and ask me to check with HP. On Sun TMPDIR directory can be redirect because i use tempnam() instead of tmpnam (This is according to Oracle).&lt;BR /&gt;&lt;BR /&gt;Anyway thanks for the feedbacks. I guess I will create cron to cleanup the directory.&lt;BR /&gt;&lt;BR /&gt;Thanks. &lt;BR /&gt;&lt;BR /&gt;I also notice that if I use crontab -e , a temporary file will be created on /var/tmp on HP but /tmp for Sun Solaris.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 06 Dec 2001 19:58:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-do-hp-ux-create-temporary-files/m-p/2627077#M40194</guid>
      <dc:creator>Ridzuan Zakaria</dc:creator>
      <dc:date>2001-12-06T19:58:27Z</dc:date>
    </item>
    <item>
      <title>Re: how do HP-UX create temporary files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-do-hp-ux-create-temporary-files/m-p/2627078#M40195</link>
      <description>TMPDIR generally works on HP (if the application developer (Oracle) honors the TMPDIR environment variable -- they're copping out on you if they push you over to HP - they should know how their code works).  &lt;BR /&gt;&lt;BR /&gt;Here's a snip of man tmpnam:&lt;BR /&gt;&lt;BR /&gt;tempnam()      allows the user to control the choice of a&lt;BR /&gt;                          directory.  The argument dir points to the name of&lt;BR /&gt;                          the directory in which the file is to be created.&lt;BR /&gt;                          If dir is NULL or points to a string that is not&lt;BR /&gt;                          an appropriate directory name, the path-prefix&lt;BR /&gt;                          defined as P_tmpdir in the &lt;STDIO.H&gt; header file&lt;BR /&gt;                          is used.  If that directory is not accessible,&lt;BR /&gt;                          /tmp is used as a last resort.  This entire&lt;BR /&gt;                          sequence can be up-staged by providing an&lt;BR /&gt;                          environment variable TMPDIR in the user's&lt;BR /&gt;                          environment, whose value is the name of the&lt;BR /&gt;                          desired temporary-file directory.&lt;BR /&gt;&lt;BR /&gt;tmpfile(3) and mktemp(3) are also available.&lt;BR /&gt;&lt;BR /&gt;BTW, check the perms of /var/tmp - we make the perms on tmp directories 1777 instead of 777; which means that you have to own the file to remove it from tmp.  These perms break some setuid programs like sendmail hooked to procmail.&lt;BR /&gt;&lt;BR /&gt;&lt;/STDIO.H&gt;</description>
      <pubDate>Thu, 06 Dec 2001 20:07:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-do-hp-ux-create-temporary-files/m-p/2627078#M40195</guid>
      <dc:creator>Christopher Caldwell</dc:creator>
      <dc:date>2001-12-06T20:07:34Z</dc:date>
    </item>
    <item>
      <title>Re: how do HP-UX create temporary files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-do-hp-ux-create-temporary-files/m-p/2627079#M40196</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I guess you should be having problems installing Oracle 9iAS. :)&lt;BR /&gt;&lt;BR /&gt;I had similar problems on my HP_UX 11 64-bits.&lt;BR /&gt;&lt;BR /&gt;I finally ended exporting TMP, TMP_DIR and TMPDIR.&lt;BR /&gt;&lt;BR /&gt;It worked the dirty way!! I can't tell you for sure which one it used.&lt;BR /&gt;&lt;BR /&gt;I am sure Oracle will be able to answer this question much better.&lt;BR /&gt;&lt;BR /&gt;regards&lt;BR /&gt;Yogeeraj</description>
      <pubDate>Fri, 07 Dec 2001 06:45:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-do-hp-ux-create-temporary-files/m-p/2627079#M40196</guid>
      <dc:creator>Yogeeraj_1</dc:creator>
      <dc:date>2001-12-07T06:45:53Z</dc:date>
    </item>
  </channel>
</rss>

