- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Send ConsoleMessage using Perl script.
Operating System - Linux
1821244
Members
2978
Online
109632
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
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
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
03-26-2007 03:17 AM
03-26-2007 03:17 AM
Send ConsoleMessage using Perl script.
Does anyone have the correct syntax for sending console message using PERL? I normally script in VB but I need to send a message from a PERL script on a UNIX machine I monitor.
I’m trying to send a ConsoleMessage using in a PERL script without using OPCMSG.EXE. In VB script I use the code snip below. Is something similar available in PERL?
Thanks,
Mike
VB Script Syntax:
Dim ConsoleMessage
Set ConsoleMessage = CreateObject("OVOAutomation.Opcmsg")
'Populate values and send message to sub agent
ConsoleMessage.MessageText = "Message Text"
ConsoleMessage.Object = "Object"
ConsoleMessage.Application = "TestApp"
ConsoleMessage.Severity = "Normal"
ConsoleMessage.Send
Perl Syntax:
$ConsoleMessage->MsgText("msgtext");
$ConsoleMessage->Object("object");
$ConsoleMessage->Application("application");
$ConsoleMessage->Severity("severity");
$ConsoleMessage->Send();
I’m trying to send a ConsoleMessage using in a PERL script without using OPCMSG.EXE. In VB script I use the code snip below. Is something similar available in PERL?
Thanks,
Mike
VB Script Syntax:
Dim ConsoleMessage
Set ConsoleMessage = CreateObject("OVOAutomation.Opcmsg")
'Populate values and send message to sub agent
ConsoleMessage.MessageText = "Message Text"
ConsoleMessage.Object = "Object"
ConsoleMessage.Application = "TestApp"
ConsoleMessage.Severity = "Normal"
ConsoleMessage.Send
Perl Syntax:
$ConsoleMessage->MsgText("msgtext");
$ConsoleMessage->Object("object");
$ConsoleMessage->Application("application");
$ConsoleMessage->Severity("severity");
$ConsoleMessage->Send();
- Tags:
- Perl
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2007 03:23 AM
03-26-2007 03:23 AM
Re: Send ConsoleMessage using Perl script.
Shalom,
All you need to do is see that the output gets to /dev/console
system ( echo "message" > /dev/console);
Thats the simplest, but quite an effective way to get messages to the console.
SEP
All you need to do is see that the output gets to /dev/console
system ( echo "message" > /dev/console);
Thats the simplest, but quite an effective way to get messages to the console.
SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2007 03:29 AM
03-26-2007 03:29 AM
Re: Send ConsoleMessage using Perl script.
open my $console, ">", "/dev/console" or die "Cannot write messages to console: $!";
:
:
print $console "Message\n";
:
:
print $console "Another message\n";
:
:
close $console;
Enjoy, Have FUN! H.Merijn [ why is M$Win always so overly complicated? ]
:
:
print $console "Message\n";
:
:
print $console "Another message\n";
:
:
close $console;
Enjoy, Have FUN! H.Merijn [ why is M$Win always so overly complicated? ]
Enjoy, Have FUN! H.Merijn
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
Learn About
News and Events
Support
© Copyright 2025 Hewlett Packard Enterprise Development LP