Programming :: Block Messages On A Message Queue ?
Dec 3, 2010I'm facing a scenario in which i need to block messages from being passed onto a message queue when my code is running. how to proceed.
View 8 RepliesI'm facing a scenario in which i need to block messages from being passed onto a message queue when my code is running. how to proceed.
View 8 RepliesHow to communicate between two threads using message queue?
View 4 Replies View RelatedFollowing function obtains the system-maintained structure for a message queue:
Code:
And following function simply resizes a message queue to a user-defined value, namely, "size":
Code:
My question is if there is a theoretical limit on user-defined message queue sizes.
To put in other words, is it possible to increase the default message queue size to any user-defined value as long as that certain value does not exceed the size of system's physical memory ?
I use 64-bit Ubuntu 9.04.
In a single main() function,so need signal handling. Use Posix Message Queue IPC mechanism , can ignore the priority and other linked list message,to implement the scenario:
View 1 Replies View Relatedis it possible to get the length or even the items of both queues, the run queue and the swap queue? I've googled a lot but had no luck. Maybe I havn't used the correct search words...
Is there any header and/or code example to use structures or any API to get these information from the kernel or the scheduler?
Anyone have an issue with Messages in Queue going crazy? and inside the emails is: Received: (qmail 13662 invoked by alias); 20 Aug 2010 10:07:14 -0700 Delivered-To: [URL]..
Don't really know what could be causing this, the other day my messages in queue was at like 5,000 or so, but now its up to 445,000 messages in queue!! All of them that exact message.
Messages are stuck in my server's /var/spool/mqueue/ folder beyond the lifetime I have specified in confTO_QUEUERETURN (5d). Any idea why this could be? The file permissions appear fine; files in the mqueue folder show rights of: Code:-rw------- 1 root smmspThis is causing an issue because the queues are slowly getting larger and larger. I'm seeing the queue size consistently growing. maillog shows entries like: Code:grew WorkList for /var/spool/mqueue to 28000Just thinking outloud -- could the queue runner not be completing it's job in time? Maybe I could check with time sendmail -q
View 1 Replies View RelatedI have a syslog-ng running and kernel build of 2.6.34.8 I use a syslog API in my program with facility LOG_LOCAL5 and and levels debug err and crit and info. when I ran on the older syslog facility I had everything logged fine as I intended. now I have written these rules into the syslog-ng.conf:
options {
flush_lines (0);
time_reopen (10);
log_fifo_size (1000);
[code]....
the last two rules show my program gnssapp. the result is all debug levels or crit or err levels I don't see any of them !
A long time ago Thunderbird had a plugin that blocked any message from being opened when the one viewed is deleted. It stopped working when the next update of Thunderbird came out, and I cannot remember it's name. The current version usually leaves a blank window when I delete, but sometimes will open a previously unread message. I normally delete spam before starting to read. If I have missed deleting a spam message it can be opened without clicking on it.
Recently I got stung by a sleeper. The messages were sent to addresses that have not been in the address book, and with a From name that has not been used for weeks. I have no idea when or how it was activated. Possibly one of the auto-opens. How do I prevent Thunderbird from automatically opening *any* messages?
Is there a more convenient way or function call to submit a job to a queue than the following in Linux?
Code:
#include <stdlib.h>
...
system( "at -f /var/myproj/task_starter.sh now" );
...
Finally I got success in setting up of CDMA USB modem but I could not access the internet or browse the internet. I can only download message and send messages using through evolution. But can browse internet.
View 1 Replies View RelatedI virtualized a PC with VMware vCenter Converter. But when I boot my virtual PC, I have an error.I found this link but I can't mount /dev, /sys and /proc. I have this error message : mount: /dev is not a block device.
View 2 Replies View Relatedi've been using some subliminal software on windows for a while now and have found it to be really good. It basically just flashes up a message on screen over the top of whatever is going on at that time but the message is only there for about 30 milli seconds
The message is not there long enough for your conscious mind to read it but the theory is that your subconscious mind will read it.It actually works really well. THe problem is that they dont package a linux version although they do have an OSX version, i'd really like this on ubuntu.
Tried it in wine and it installs but nothing happens after that. Alternatively perhaps somebody can tell me how you could get a message to flash up on screen based on a list of messages in a text file?
I can't do any updates! it just gives a message like this: "The following packages block the update: kdebase-workspace-libs4+5"
View 2 Replies View RelatedI am in deeply need of queue (linear data structure) in shell script. How can I implement this ??
View 2 Replies View RelatedWe are trying to create a message forwarder program that receive a message on Port A and pass it on t Port B. Also receive a message from Port C and Pass it on to Port D as follows.
[Code]...
i have problem in socket programming, while displaying received message in file,i got a problem... i cant able to write it in the file.... this is the code....
Code:
/* tcpserver.c */
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <stdio.h>
[Code]....
now my problem is run time error i can able to create file but i cant able to write file....log.txt contain nothing.... as here i have give sample code... dont say not initialising function and all.... i have initialised , please only see func1() - my problem is only not able to write msg which i got received from the client..
For the following compilation warning message I need to create some sample program in C for self study. Also I am looking for some good web link where all the C warnings are described.
1. Warning #47: incompatible redefinition of macro "entity" . Undefine macro before
2. Warning #167: argument of type is incompatible with parameter of type
3. Warning #175: subscript out of range
[code]....
I want read the log messages to my 'c' application , i am using the fedora core 8 operating system , how to read the system log messages(syslog) through my application.
View 3 Replies View RelatedI tried to get a block of lines in awk, but unfortunately it returns output of one line only. I don't state the code here, because it's too short and too poor. What exactly I wanted to do: from file "/boot/grub/menu.lst" get blocks of lines, starting by title and ending by Now I have just
Code:
script="/boot/grub/menu.lst";
OLDIFS=$IFS; IFS=$'
';
[code]....
I want to get every block as one row of array.
I have one password text file: username<tab>password, I want to wrote any bash script to check if certain user exist at this file, if did exist print out the password. I get stocked at password value to AWK if block:
#!/bin/bash
FILE="$1"
if [ ! -e "$FILE" ]
then
[code]....
it not work , but if I change toassword=$(awk < $FILE -F\t '{ if (test $1=="JIMMY2") print $2;}') it works, anything wrong $1==$user_name? $FILE is the password file, -F\t is use tab as delimiter.
I have designed a simple mail client to download messages/data to a file.
The server type is CAPA STLS which means can handle noncrypted and encrypted logins.
I have a problem which is that POP3 CAPA STLS mail server does not want to delete messages. It deletes the messages on the non STLS side.
For an STLS session, I receive the +Ok for a Deleted message.
Language C, Library openssl, IP4.
Compiler: gcc.
I am writing a client chat server program in java. The chat server is already written. I created the interface and I connected to the chat server. The server keeps sending protocol messages to whom ever is connected, also it keeps sending specific protocol every 10 sec to check if user is still online.My problem is when I connect from my interface to the chat server, the program gets stuck, I can not press any other button because after connection my program keeps receiving commands from server(I have a method to keep reading after connection). How can I keep track of messages sent from server and not get stuck i.e press other buttons or type in the interface?
View 2 Replies View RelatedI was wondering if you could recommend a simple way to achieve functionality where received email messages are automatically processed and used in SQL commands (depending on certain criteria, of course). For example, say I have made a PHP-based blog application and it's located at example.com and I'd like to give members the option of posting to their blogs by sending email to a special @example.com address. The email messages received there will be inserted into a database depending on the sender's address, with the body becoming the post and the subject line becoming the post's title, etc.
Another example could be how those trouble ticket systems let customers submit tickets via email, while the support agents operate via a database-driven Web application. Is this the type of thing one must code from scratch, or is there an open source solution out there which only needs to be configured accordingly?
According to RFC 1939: "POP3 is not intended to provide extensive manipulation operations of mail on the server; normally, mail is downloaded and then deleted." However most of the mail clients have that option "Leave messages on server" after they have been downloaded. How is it done?
I tried sniffing mail traffic with Wireshark, but the only POP3 provider I have is Gmail and its POP3 access is SSL secured, so I was unable to gather any info from this... I tried downloading sources of Thunderbird and Evolution and checked what are they doing with "leaving messages", but it seems my C++ skills are not enough - I was unable to understand what is happening when "leaving"...
Suggest me some POP3 provider, that is providing unsecured POP3 access, so I could try again reverse engineering with Wireshark?
Is there an easy example of a block device driver I could follow as a guide to write my own module?
View 5 Replies View RelatedIs there an online resource to lookup error messages generated when compiling C++ code?
View 5 Replies View RelatedMy script looks really crap and messy, the logic isn't great and I'm not hugely happy with it. Also it echo's $i instead of an actual IP address (line 10). How to improve this. It basically searches through /var/log/messages for multiple FTP hits and when the hit count is higher than a specific number the IP is added to a config file and ftp is restarted. There are some obvious flaws in my script.
Code:
MAXHITS=0
TOPHITS=`grep "FTP session closed." /var/log/messages* | awk '{print $7}' | sed -e 's/^.*[//' -e 's/].*$//' | uniq -c | sort -nr`
HITNUMB=`echo $TOPHITS | awk '{print $1}'`
IPHIT=`echo $TOPHITS | awk '{print$2}'`
HIGHIP=`echo $TOPHITS | grep $HITNUMB | grep $IPHIT | awk '{print $2}'`
if [ $HITNUMB -gt $MAXHITS ]; then
for i in $HIGHIP;
do
echo $i
sed -i '78s/$/,$i/' /opt/etc/proftpd.conf
/root/ftp restart
done
else
echo "not greater than $MAXHITS"
fi
I'm not even sure what will happen if I get multiple responses for my $TOPHITS. It would be cool if it could search for IP's already blacklisted somehow, it might actually be easier to just create a file with a set of blacklisted IP's or something.
where the printk messages are stored when we call a insmod? I'm using Slackware, and I think my distro can store these messages on others place.
View 3 Replies View RelatedI'm trying implement a small server for a university work, my server is creating, binding and listening but it don't accept any connection, these are the files I'm using in server:
Code:
// Definition of the Socket class
#ifndef SOCKET_H
#define SOCKET_H
#include <sys/types.h>
code....
I've made a client just for test it, but no ones run well, the server is always returning -1 when accept is called!!
What should I do to send and receive messages in this server??