How to monitor specific file size in SCOM 2012

Dear Experts,
In our environment we need to SCOM have monitor profile of NTuser.dat file growth in all citrix servers, This file is presented in the path of  “C:\Documents and Settings\ctx_cpsvcuser\NTuser.dat”. when this profile is reached 10 MB
size then SCOM has to trigger the alert, So can you please help me out to achieve this Task. I have tried many scripts and no luck.. So please provide me step by steps to configure this.
Saravana Raja

Hi Yan,
I have followed with Kevin steps with below model scripts and does not work it seems.Also I didn,t get any errors also.. I don't understand whats wrong there...
Set objFSO = CreateObject(“Scripting.FileSystemObject”)
Set objFile = objFSO.GetFile(“C:\Documents and Settings\ctx_cpsvcuser\ntuser.dat”)
varSize = objFile.Size
Dim oAPI, oBag
If varSize > 52428800 Then
Set oAPI = CreateObject(“MOM.ScriptAPI”)
Set oBag = oAPI.CreatePropertyBag()
Call oBag.AddValue(“Status”,”Bad”)
Call oBag.AddValue(“Size”, varSize)
Call oAPI.Return(oBag)
Else
Set oAPI = CreateObject(“MOM.ScriptAPI”)
Set oBag = oAPI.CreatePropertyBag()
Call oBag.AddValue(“Status”,”Ok”)
Call oAPI.Return(oBag)
End If
Saravana Raja

Similar Messages

  • How to monitor self signed certificates using scom 2007 R2

    How to monitor self signed certificates using scom 2007 R2.  i need to monitor specifically self signed certificates expiration. if  possible in two state monitor...please suggest me the best way..
    B John

    Hi,
    Based on my understanding, that you want to create a monitor to monitor certificate expiration, with two state, when the certificate is about expiration for 21 days,, send warning, when the certificate is about expiration for 10 days, then send
    alert. I think we need to create scripts to do so, hope the below links can be helpful:
    Monitoring Certificates In SCOM
    http://blogs.technet.com/b/omx/archive/2013/01/30/monitoring-certificates-in-scom.aspx
    Monitoring Expiring Certificates using SCOM
    http://blogs.technet.com/b/sgopi/archive/2012/05/18/monitoring-expiring-certificates-using-scom.aspx
    Regards,
    Yan Li
    Regards, Yan Li

  • How to get the file size (in bytes) for all files in a directory?

    How to get the file size (in bytes) for all files in a directory?
    The following code does not work. isFile() does NOT recognize files as files but only as directories. Why?
    Furthermore the size is not retrieved correctly.
    How do I have to code it otherwise? Is there a way of not converting f-to-string-to-File again but iterate over all file objects instead?
    Thank you
    Peter
    java.io.File f = new java.io.File("D:/todo/");
    files = f.list();
    for (int i = 0; i < files.length; i++) {
    System.out.println("fn=" + files);
    if (new File(files[i]).isFile())
         System.out.println("file[" + i + "]=" + files[i] + " size=" + (new File(files[i])).length() ); }

    pstein wrote:
    ...The following code does not work. Work?! It does not even compile! Please consider posting code in the form of an SSCCE in future.
    Here is an SSCCE.
    import java.io.File;
    class ListFiles {
        public static void main(String[] args) {
            java.io.File f = new java.io.File("/media/disk");
            // provides only the file names, not the path/name!
            //String[] files = f.list();
            File[] files = f.listFiles();
            for (int i = 0; i < files.length; i++) {
                System.out.println("fn=" + files);
    if (files[i].isFile()) {
    System.out.println(
    "file[" +
    i +
    "]=" +
    files[i] +
    " size=" +
    (files[i]).length() );
    }Edit 1:
    Also, in future, when posting code, code snippets, HTML/XML or input/output, please use the code tags to retain the indentation and formatting.   To do that, select the code and click the CODE button seen on the Plain Text tab of the message posting form.  It took me longer to clean up that code and turn it into an SSCCE, than it took to +solve the problem.+
    Edited by: AndrewThompson64 on Jul 21, 2009 8:47 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How to reduce jpg file size, not pixel dimensions?

    I am preparing images for the web and I really have 2 questions: one about gifs, and one about jpgs.
    My standard procedure is to reduce the image to the desired pixel dimensions at 600 dpi
    That gives me a crisp small image. then I either use it as is if the file size is low enough (I try for under 600 kb) or convert it to a gif with the save for web and devices tool.
    So here are my 2 questions (I will count this solved with either answer)
    1) When I convert to a gif I have the 4 boxes: one with original size, the other 3 with options but often the options are too low res for me How do I change my 3 options to start at a higher gif res?
    2) If I try to reduce the file size of the jpg in the image size box I set the resolution lower ( 400, 300), which lowers the pixel dimensions and the filesize, but I don't want to cahnge the pixel dimensions. And  If I reset the pixel dimensions back to the size I want them, even though it is a lower resolution the file size doesn't change. How to reduce jpg file size using only the resolution, not pixel dimensions?  PS I have tried messing with checking and unchecking the 3 little boxes( scale styles, constrain proportions, and resample) but nothing has worked.

    Gif is not a great filetype, especially if you want a crisp image. What are your pixel dimensions?
    For web, it makes no difference what the dpi is, only the final pixel dimensions so once you have that as you want, use 'Save for Web and Devices' and you can lower the quality - 100% being max and 0% being lowest. I wouldn't save anything below 55%. For a 600kb image, your dimensions must be rather big.

  • Searching for a specific file size

    Hello,
    It's been a while but it seems like XP let me search for specific file sizes - e.g. if I wanted to search for files that were greater than 10GB or if I wanted to search for files less than 20GB.
    I can't figure it out in Windows 8.1.
    If the answer is possible through standard search and not powershell, I'd prefer the GUI way.
    Thanks

    In File Explorer (was Windows Explorer), type the search criteria into the box in the top right of the screen and press Enter.
    Example searches are:
    A minimum file size, simply type size:>30,000KB into the Search box and press Enter.
    type:=.pdf or type:=.doc will display specific file types.
    filename:x will display files using a partial filename. x represents the partial filename you want to search for.
    kind:video, kind:music or kind:pictures will find all the videos, music or pictures.
    If you just click or tap in the Search box, Search Tools will appear which allows the choosing of a Kind, a Size, Date Modified, Other Properties and Advanced search. In Folder Options > Search Tab, the search options can be changed, e.g. Find partial
    matches.
    Providing the location is indexed, you can search in File Explorer for a specific word or phrase by typing content:
    followed by your phrase enclosed in double quotes. This will produce a list of files matching the criterion.
    Speed up the search by opening File Explorer (was Windows Explorer) at the folder you want to search, rather than at the root folder. Also, pressing F3 will show Search options like Date Modified and Size.
    Ninety-nine per cent of politicians give the rest a bad name.

  • How to change archivelog file size in oracle 11g

    Hello,
    In my oracle 11g database inside flash recovery area how to increase each files size , now it 41 Mb per file iits name is o1_mf_1_161_8mfpwtbj_.arc how to change it to
    the understandable name.
    Thanks and regards

    Hi,
    As you know archived log is create when online log is switch. Archived log size might be maximum equal to online redo log size.
    Because archived log size is copied from online redo log file, if you want change archived redo log size, then you must change online redo log size.
    But you must think, what is advantages and disadvantages of change of online redo log size, it depends direct task LGWR process.
    You can change archived redo log name with change LOG_ARCHIVE_FORMAT parameter.
    See : http://docs.oracle.com/cd/B19306_01/server.102/b14237/initparams103.htm
    Regards
    Mahir M. Quluzade

  • How to read music file size?

    I have the third generation iPad. I've sync'd (via iTunes of course) a CD album in Apple Lossless and another CD album in AIFF. Most other audio that have already been sync'd is in MP3 format.
    So how can I see the file size of each song in the iPad?

    Well that's how to see the file size in iTunes. But I'm concerned (suspicious actually) that there's some background modification or something after getting sync'd with the iPad.
    So I'm curious about how to see the file size of each song IN THE iPAD directly.
    Or not possible?

  • Hitting a specific file size when exporting from Flash CS5

    I need to export three banners to .swf from flash and they all need to be under 61K.  They all use photographs and are 5-7 seconds long each and the dimentions are 300x250 px, 300x600 px & 728x90 px.  Is there any way I can put in the specific file size in the program and make it under 61k?  I tried using the publish settings and lowering the quality and even at 40% quality the file size only went down 20KB from 147 to 127.  If you cannot do that in the program is there any third party programs that can be used to do this?  Thanks for your help!

    What you should do is set the Publish Settings to generate a size report.  That way you will have a detailed listing of what each element of the design contributes to the file weight.  I would guess that the images are going to be the heavy hitters, so you might need to use image software to optimize them as much as possible before importing them into Flash.

  • Specific file sizes

    Hi all!
    I was wondering if anyone could help me with creating a specific file size.
    As far as I'm aware, file size is strictly dependent on content.
    However, I have a request to make a 2MB file - no more, no less.
    As is stands, I have a 1.3MB file (This is at it's smallest setting in the 'save as' dialogue box)
    I am working in Acrobat Pro 9.1.2
    Many thanks for any help!
    B

    Thank you for your reply
    I was hoping it wouldn't involve trial and error tweaking -it's time consuming and it's a luxury I don't have.
    But thats the only way I can think of doing it too!
    I find other files on the web that have specific sizes - there must be an easier way...
    BellaDesigner

  • How to disable an alert for specific time period in SCOM 2012 R2

    Hello,
    Is there any option to disable an alert for specific time period in SCOM 2012 R2
    Regards,
    angs

    No. But you can use the scheduler module in your rule or monitor, which will dictate when the workflow will actively run on the agent - hence disabling alerting for that time period.
    http://msdn.microsoft.com/en-us/library/ff453828.aspx
    Jonathan Almquist | SCOMskills, LLC (http://scomskills.com)

  • How to open sdf files in SQL server 2012?

    How to open sdf files in SQL server 2012?
     I couldn’t figure out how to open the sdf files in SQL server 2012
     Thank you
     Best
     Jamal

    I don't think it's hard if understood the question properly you can try this I do it most of the time and this might be the solution for you, sometimes minor simple click is a life saver:)
    1. 
    Open SQL Server Management Studio, or if it's running select File -> Connect Object Explorer... and click the
    connect drop down arrow
    2. 
    In the Connect to Server dialog you will see Database Enghine, Analaysis Servie on so on and you go head change Server type to
    SQL Server Compact Edition
    3. 
    From the Database file drop-down as shown below click the drop down arrow and select <
    Browse for more...>
    4. 
    And you will see C:\, D:\, G:\
    drive and so on and open, your SDF file where it is located
    I hope this has been informative for you and good luck
    Please remember to click “Mark as Answer” on the post that has answered your question as it is very relevant to other community members dealing with same problem in seeking the right answer

  • Problem exporting image to specific file size

    I've had some professional images shot and I can see from the file size in Aperture that they range from 13 - 73 mb. I need to submit them as 72dpi and 300dpi files and they must be between 1 & 3 mb in size.
    I'm having no problems in exporting them at the correct dpi but the file sizes come out between 451kb and 1.8kb: 3 of the 6 images are too small, ie under 1mb.
    What I'm doing is 'export version', then choosing the preset option of 'jpeg original size', editing it to the dpi I want, setting the image quality at a max of 12.
    How can I get these file sizes to be bigger?
    Thanks, and please help me quickly because I've a submission deadline approaching!

    Well that's interesting Ernie. I did as you said, but also exported an image while I had the settings at 4288 x 4288 pixels. The resultant file size at that setting is 1.4MB. The file size when I went back to 'original size' is 795KB, exactly the same as before.
    So I thought - if I can go above original size in that way, then can I alter the % to be over 100? I tried at 150%, which it accepted, and I've now got a file size of 1.3MB.
    So I guess I've got what I wanted - not that I really understand it, because 'original size' clearly isn't original size at all!
    Sorry Leonie - I didn't answer your question - they haven't given me a specification for pixel size as in 4288 x 4288: only 300 & 72dpi, a file size of 1-3MB, and a they must be JPGs.
    And thanks for your help Frank - I've tried starting out with JPGs and with TIFFs as the photographer supplied me with both. I'd cropped some of the images but not others. I appreciate you offer of having a go with my images, but I think that - as I can go to over 100% - I've got it sorted now! Just hope there's no deterioration in image quality.
    Many thanks everyone!

  • How to monitor Alert file large in EM Grid

    Hello,
    In Enterprise Manager 9 we used to monitor Alert File Large.
    I am not able find this in Grid Control.
    Can anybody tell me how to monitor this metric in OEM 10 GRid?
    Best regards,
    Jvries

    You must to select the host target and metric and policy issues
    Select all metrics and search File or Directory size MB
    You can to add the file when you want to monitor the size and
    you must to enable a response action when the critical theshold appear
    The response action must be a shell script like this
    #/bin/ksh
    #if you want backup
    cp /directory/file.log /backup_destination/file.log.bak
    #for clean the file and his size was empth
    /directory/file.logRemember that you want enable the credentials for host and the owner of agent had rights of read and write in the location of file
    Regards

  • Is it possible to scipt "save for web" in a specific file size?

    The question says it all.
    i want to automatisate the last step of my work.
    it needs to save my work as a jpg in a specific folder with a maximum file size (82kb) ...
    how can i achieve this step?
    Thanks for you help

    I wanted to get snarky about doing a Forum Search before posting, because I have the feeling this has been treated more than once … but I can’t currently find the threads, either.
    As far as I can tell the task requires saving, checking the resultant file’s size, if it offends save again with different settings, check … until the requirement is met.

  • How do I show file size in the Finder icon view for images?

    How can I add the file size to the icon view "File Info" for images?
    I know how to get it to display the image size under View Options. In this mode it shows pixel dimensions for some images (not for svg or pdfs tho) and file size for some non-images (rar, zip, but not txt or plain text files).
    Is there some plist I can modify?

    Just found the answer in a post with this subject: 
    How Do I Change the Mailbox Font Size in the Sidebar?

Maybe you are looking for