'' isimage not recognizedd as an internal or external command, operable

OS:win7 64
mongodb:(推荐64位版本,当然如果你系统是32位的,只能使用32的版本了)
IDE:vs的同学请跳过吧,因为官网提供的就是2010的版本)
因为项目的需求,要提供vc2008的版本,不得已才折腾的,╮(╯▽╰)╭
-------------------------------------------------------------------------
编译参考,虽然是vs2010的,但是vs2008同理:
遇到的问题:
1.'cl' is not recognized as an internal or external command,operable program or batch file.
修改方法:在& $PYTHON\scons-2.2.0\SCons\Tool\MSCommon\vc.py
# Dict to 'canonalize' the arch
_ARCH_TO_CANONICAL = {
: "amd64",
: "amd64",
: "amd64",
原因可能是我安装vs2008不支持x86_64,所以不能接受&amd64&编译参数,这样修改后,只能编译32位的版本了,注意!
解决办法2:
打sp1的补丁
ISO版的SP1(即VS2008SP1CHSX80811.iso):
现在不打sp1的补丁,后面会遇到编译错误,还是要打的。
2.编译的时候找不到&cstdint.h&头文件
这个头文件本身是C11里面的东西。vc2010的sdk有这个,vs2008没有这个。观察这个头文件,只是一些数据类型的定义,故可以替换之.
&使用msinttypes里面stdint.h替换下:
把stdint.h放到你的vc的sdk目录下,类似这样目录:Microsoft SDKs\Windows\v6.0A\Include
并且修改&mongodb-src-r2.4.6\src\mongo\platform&下面cstdint.h中相关代码:
1 #if defined(_MSC_VER)
2 #include &stdint.h& /* #include &cstdint.h& */
3 #define _MONGO_STDINT_NAMESPACE
/* #define _MONGO_STDINT_NAMESPACE std */
3.编译的时候找不到&EADDRINUSE&和&ECONNABORTED&的定义
打开&mongodb-src-r2.4.6\src\mongo\util\net&下的"listen.cpp",做如下修改:
1 #include "pch.h"
2 #include "listen.h"
3 #include "message_port.h"
4 #include "mongo/base/owned_pointer_vector.h"
6 #ifdef _WIN32
#define EADDRINUSE
WSAEADDRINUSE
#define ECONNABORTED
WSAECONNABORTED
11 #ifndef _WIN32
13 # ifndef __sunos__
include &ifaddrs.h&
15 # endif
16 # include &sys/resource.h&
17 # include &sys/stat.h&
&后面再把整个工程放上来,还有一点细节要修改。待续
阅读(...) 评论()& Page 'Dell Open Manage Server Administrator (OMSA) alert setup – updated'
Dell Open Manage Server Administrator (OMSA) alert setup – updated
Posted on November 7, 2008 in , ,
Further to this post on
I have amended the configuration files required to correctly configure OMSA.
I discovered that Dell’s documentation is incorrect and that running a batch file in an alert directly does not work – you need to call it with cmd.exe BUT you do not (normally) need to provide the path to cmd.exe – I have therefore changed the alert commands (shown in the extended entry).
I have also amended the dellalert.bat file as I also found that blat would not always work as there is no working blat profile when called from OMSA and there is no obvious way of setting a profile up.
You could add the setup into dellalert.bat, trigger an alert and then remove the setup. Alternatively blat can have the mail server and the sender name provided in the dellalert.bat. This makes installation easier as all you need to do is copy the blat files to the windows directory.
Again the updated dellalert.bat is in the extended entry.
Dellalert.bat should now contain the following lines.
::Dell alert program
::Set variables below as appropriate
::needs blat downloaded (/2qdxea) Put blat.exe in the system path
::No longer needs blat installed as configuration is set in the environment variables.
set log=c:\jobs\dell.txt
set pager=
set company=Companyname
set server=%computername%
set mailserver=mailservername
set alertfrom=
date /t >%log%
time /t >>%log%
echo %* >>%log%
if {%1}=={p} blat %log% -to %pager% -server %mailserver% -f %alertfrom% -subject “%company% %server% alert – %*”
if not {%1}=={} blat %log% -to %mail% -server %mailserver% -f %alertfrom% -subject “%company% %server% alert – %*”
The commands to specify the call to dellalert.bat are below. Note that you need to specify cmd.exe and then the batch file. As the batch file has parameters with quotes, the quotes need to escaped with backslashes (as per the information below). I highly recommend you save these commands to a batch file called conf.bat and then run the batch file – a lot easier to manage, recall and implement on multiple servers. Each line starts with omconfig – you will probably find your web browser has wrapped the lines, but if you copy/paste the content into notepad your lines should be correct.
omconfig system alertaction event=batterywarn execappath=”cmd /c \”c:\jobs\dellalert p battery probe warning\””
omconfig system alertaction event=batteryfail execappath=”cmd /c \”c:\jobs\dellalert p battery probe failure\””
omconfig system alertaction event=fanwarn execappath=”cmd /c \”c:\jobs\dellalert fan probe warning\””
omconfig system alertaction event=fanfail execappath=”cmd /c \”c:\jobs\dellalert p fan probe failure\””
omconfig system alertaction event=hardwarelogwarn execappath=”cmd /c \”c:\jobs\dellalert hardware log warning\””
omconfig system alertaction event=hardwarelogfull execappath=”cmd /c \”c:\jobs\dellalert p hardware log failure\””
omconfig system alertaction event=intrusion execappath=”cmd /c \”c:\jobs\dellalert chassis intrusion detected\””
omconfig system alertaction event=memprefail execappath=”cmd /c \”c:\jobs\dellalert p memory prefailure\””
omconfig system alertaction event=memfail execappath=”cmd /c \”c:\jobs\dellalert p memory failure\””
omconfig system alertaction event=systempowerwarn execappath=”cmd /c \”c:\jobs\dellalert p system power warning\””
omconfig system alertaction event=systempowerfail execappath=”cmd /c \”c:\jobs\dellalert p system power warning\””
omconfig system alertaction event=powersupply execappath=”cmd /c \”c:\jobs\dellalert p psu critical\””
omconfig system alertaction event=powersupplywarn execappath=”cmd /c \”c:\jobs\dellalert p psu warning\””
omconfig system alertaction event=processorwarn execappath=”cmd /c \”c:\jobs\dellalert p processor warning\””
omconfig system alertaction event=processorfail execappath=”cmd /c \”c:\jobs\dellalert p processor failure\””
omconfig system alertaction event=redundegrad execappath=”cmd /c \”c:\jobs\dellalert p redundancy degraded\””
omconfig system alertaction event=redunlost execappath=”cmd /c \”c:\jobs\dellalert p redundancy lost\””
omconfig system alertaction event=tempwarn execappath=”cmd /c \”c:\jobs\dellalert p temp probe warning\””
omconfig system alertaction event=tempfail execappath=”cmd /c \”c:\jobs\dellalert p temp probe failure\””
omconfig system alertaction event=voltwarn execappath=”cmd /c \”c:\jobs\dellalert voltage probe warning\””
omconfig system alertaction event=voltfail execappath=”cmd /c \”c:\jobs\dellalert p voltage probe failure\””
omconfig system alertaction event=watchdogasr execappath=”cmd /c \”c:\jobs\dellalert Watchdog ASR\””
omconfig system alertaction event=storagesyswarn execappath=”cmd /c \”c:\jobs\dellalert p storage system warning\””
omconfig system alertaction event=storagesysfail execappath=”cmd /c \”c:\jobs\dellalert p storage system failure\””
omconfig system alertaction event=storagectrlwarn execappath=”cmd /c \”c:\jobs\dellalert p storage controller warning\””
omconfig system alertaction event=storagectrlfail execappath=”cmd /c \”c:\jobs\dellalert p storage controller failure\””
omconfig system alertaction event=pdiskwarn execappath=”cmd /c \”c:\jobs\dellalert p physical disk warning\””
omconfig system alertaction event=pdiskfail execappath=”cmd /c \”c:\jobs\dellalert p physical disk failure\””
omconfig system alertaction event=vdiskwarn execappath=”cmd /c \”c:\jobs\dellalert p virtual disk warning\””
omconfig system alertaction event=vdiskfail execappath=”cmd /c \”c:\jobs\dellalert p virtual disk failure\””
omconfig system alertaction event=enclosurewarn execappath=”cmd /c \”c:\jobs\dellalert p enclosure warning\””
omconfig system alertaction event=enclosurefail execappath=”cmd /c \”c:\jobs\dellalert p enclosure failure\””
omconfig system alertaction event=currentwarn execappath=”cmd /c \”c:\jobs\dellalert p current probe warning\””
omconfig system alertaction event=currentfail execappath=”cmd /c \”c:\jobs\dellalert p current probe failure\””
omconfig system alertaction event=storagectrlbatterywarn execappath=”cmd /c \”c:\jobs\dellalert storage controller battery warning\””
omconfig system alertaction event=storagectrlbatteryfail execappath=”cmd /c \”c:\jobs\dellalert p storage controller battery failure\””
So now the implementation steps are as follows.
Install OMSA on the server
Download blat, copy dellalert.bat and conf.bat from above.
Edit dellalert.bat to have your specific information. The variables are pretty obvious
Extract blat to your windows directory
Double click conf.bat to configure OMSA
Run Server administrator to check the settings have been implemented correctly (see previous post for examples)
Test – normally a safe way to do this is to unplug one of the redundant power supplies. I would recommend you also set up the alerts to display a popup for this event so you know the alert has been triggered. Then unplug the power. Wait about 20-30 seconds for the alert to popup on screen and then wait for your email/pager to activate.
Any updates will be posted to this blog and to the
category – so check there if this page is old.
Update – I’ve now made the
– Batch files updated with corrections to dellalert.bat and additions to conf.bat. The dellalert.bat in the body of this post was correct – the version available to download was not. Thanks to Martin Wiesner for the information.
Like this post? Spread the word!
Thanks for this… I’ve been looking for exactly this solution. I really appreciate your helpful post. Next time you’re in Seattle, I owe you a beer.
Leave a comment

我要回帖

更多关于 internal external 的文章

 

随机推荐