- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- /var/spool/mqueue
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
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
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- 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
тАО05-13-2008 09:52 PM
тАО05-13-2008 09:52 PM
My /var/spool/mqueue contaings approx 5 Lac files.
I want to remove these files but not possible in single shot of command " rm /var/spool/mqueue/*"
If I go for group of 50s files like " rm /var/spool/mqueue/TmAA* .... likewise... its happening...but will take few days /week this way.
Can you please suggest me how can i do this
can I remove complete directory "/var/spool/mqueue" by "rm -rf /var/spool/mqueue"
Regards,
Prakash
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-13-2008 10:21 PM
тАО05-13-2008 10:21 PM
SolutionTake a look in this thread
http://forums11.itrc.hp.com/service/forums/questionanswer.do?admit=109447626+1210745968530+28353475&threadId=1164233
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-13-2008 11:35 PM
тАО05-13-2008 11:35 PM
Re: /var/spool/mqueue
/var/spool/mqueue is the directory that mail spools in.
-fuser /var/spool/mqueue/
-stop sendmail (/sbin/init.d/sendmail stop)
-ll -d /var/spool/mqueue/ (note down the permissions)
-rm -rf /var/spool/mqueue/
(it will be faster to delete the dir and recreate it)
recreate the /var/spool/mqueue/ and give the correct permissions, restart the sendmail.
But you need to know and correct the problem of getting such a huge no. of mail queues. That should be the next step.
Regards,
Rasheed Tamton.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-13-2008 11:36 PM
тАО05-13-2008 11:36 PM
Re: /var/spool/mqueue
I tried following loop on my server from the link suggested by you. But its giving message "sh:1: Paramenter not set.
-------------------------------------
for i in `mailq |grep -v Deferred |grep -v mqueue |grep -v - |awk '{print $1}'`
do
rm /var/spool/mqueue/df$i
rm /var/spool/mqueue/qf$i
done
# mailq
/var/spool/mqueue is empty
-----------------------------------
Regards,
Prakash
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-13-2008 11:40 PM
тАО05-13-2008 11:40 PM
Re: /var/spool/mqueue
>If I go for group of 50s files like " rm /var/spool/mqueue/TmAA
With such a huge no. of queues and you were trying to remove it manually already, follow my steps for quick resolution.
Regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-14-2008 12:46 AM
тАО05-14-2008 12:46 AM
Re: /var/spool/mqueue
I felt better to go with your suggestion. Thanks to others for helping hands.
I have already launched "rm /var/spool/mqueue" and started clearing file.
But have lil question. If in case new created directory "/var/spool/mqueue" will miss by chance any right/owner/group, will it creat any major problem for my server functionality.
(FYI : We are not using mail services of our server at all.)
---------------------------------------------
fuser /var/spool/mqueue/
-stop sendmail (/sbin/init.d/sendmail stop)
-ll -d /var/spool/mqueue/ (note down the permissions)
-rm -rf /var/spool/mqueue/
(it will be faster to delete the dir and recreate it)
recreate the /var/spool/mqueue/ and give the correct permissions, restart the sendmail.
---------------------------------------------
Many thanks to All of you.
Reagards,
Prakash
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-14-2008 12:52 AM
тАО05-14-2008 12:52 AM
Re: /var/spool/mqueue
If you do not use mail then it will not affect it. But still it is better to mkdir and chown/mod again back for the above dir, if in case, someone else might use it in the future because the UNIX world supposed to be systematic and professional.
If you are new in the forum, please look assigning points section.
Regards,
Rasheed Tamton.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-14-2008 01:12 AM
тАО05-14-2008 01:12 AM
Re: /var/spool/mqueue
almost similar thread from you. looks like the anser is here.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-14-2008 03:26 AM - edited тАО11-09-2012 12:14 AM
тАО05-14-2008 03:26 AM - edited тАО11-09-2012 12:14 AM
Re: /var/spool/mqueue
>approx 5 Lac files.
How many is that again??
>Rasheed: (it will be faster to delete the dir and recreate it)
It would be faster to learn the right commands to remove massive quantities, so you don't mess up the directory permissions.
If you just want to remove all of them, you can do:
# find /var/spool/mqueue -type f -exec rm -f {} +
>But you need to know and correct the problem of getting such a huge no. of mail queues.'
Right.
>But its giving message "sh:1: Parameter not set.
for i in `mailq |grep -v Deferred |grep -v mqueue |grep -v - |awk '{print $1}'`
Something is wrong with this line. I have no idea why is it has "-v -"? I'll have to try this at work.
One way to check this is to execute:
mailq | grep -v Deferred | grep -v mqueue | grep -v - | awk '{print $1}'
You are probably getting nothing.
># mailq
/var/spool/mqueue is empty
Well you emptied the queue.
And look at your other thread as mentioned by Ahsan:
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1230131
http://h30499.www3.hp.com/t5/Messaging/cleaning-var-spool-mqueue/m-p/5108075
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-14-2008 03:44 AM
тАО05-14-2008 03:44 AM
Re: /var/spool/mqueue
I found following message on executing your suggested ( If you just want to remove all of them, you can do:
# find /var/spool/mqueue -type f -exec rm -f +)
I found :
find: -exec not terminated with ";"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Can yo uplease tell me what does it mean..
Regards,
Prakash